From 86b306d596ddfc426fb2b468dfaee9498a973f38 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Tue, 10 Jan 2023 16:51:28 -0500 Subject: [PATCH] stepping through copy ctors in the debugger is annoying --- modules/c++/hdf5.lite/include/hdf5/lite/Info.h | 6 +++--- modules/c++/hdf5.lite/include/hdf5/lite/Read.h | 4 ++-- modules/c++/hdf5.lite/source/Info.cpp | 10 +++++----- modules/c++/hdf5.lite/source/Read.cpp | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/c++/hdf5.lite/include/hdf5/lite/Info.h b/modules/c++/hdf5.lite/include/hdf5/lite/Info.h index b25ad780b..632b738ff 100644 --- a/modules/c++/hdf5.lite/include/hdf5/lite/Info.h +++ b/modules/c++/hdf5.lite/include/hdf5/lite/Info.h @@ -99,9 +99,9 @@ struct FileInfo final : public GroupInfo }; -CODA_OSS_API FileInfo fileInfo(coda_oss::filesystem::path); -CODA_OSS_API GroupInfo groupInfo(coda_oss::filesystem::path, std::string loc); -CODA_OSS_API DatasetInfo datasetInfo(coda_oss::filesystem::path, std::string loc); +CODA_OSS_API FileInfo fileInfo(const coda_oss::filesystem::path&); +CODA_OSS_API GroupInfo groupInfo(const coda_oss::filesystem::path&, const std::string& loc); +CODA_OSS_API DatasetInfo datasetInfo(const coda_oss::filesystem::path&, const std::string& loc); } } diff --git a/modules/c++/hdf5.lite/include/hdf5/lite/Read.h b/modules/c++/hdf5.lite/include/hdf5/lite/Read.h index 9a5e9c563..ed57dd12b 100644 --- a/modules/c++/hdf5.lite/include/hdf5/lite/Read.h +++ b/modules/c++/hdf5.lite/include/hdf5/lite/Read.h @@ -44,8 +44,8 @@ namespace hdf5 namespace lite { -CODA_OSS_API types::RowCol readFile(coda_oss::filesystem::path, std::string datasetName, std::vector&); -CODA_OSS_API types::RowCol readFile(coda_oss::filesystem::path, std::string datasetName, std::vector&); +CODA_OSS_API types::RowCol readFile(const coda_oss::filesystem::path&, const std::string& loc, std::vector&); +CODA_OSS_API types::RowCol readFile(const coda_oss::filesystem::path&, const std::string& loc, std::vector&); } } diff --git a/modules/c++/hdf5.lite/source/Info.cpp b/modules/c++/hdf5.lite/source/Info.cpp index 92f319184..e96d700ac 100644 --- a/modules/c++/hdf5.lite/source/Info.cpp +++ b/modules/c++/hdf5.lite/source/Info.cpp @@ -126,7 +126,7 @@ static std::vector getDatatypes(H5::Group& group) } // https://docs.hdfgroup.org/archive/support/HDF5/doc1.8/cpplus_RM/readdata_8cpp-example.html -static hdf5::lite::GroupInfo groupInfo_(coda_oss::filesystem::path filename, std::string loc) +static hdf5::lite::GroupInfo groupInfo_(const coda_oss::filesystem::path& filename, const std::string& loc) { hdf5::lite::GroupInfo retval; retval.filename = filename.string(); @@ -144,11 +144,11 @@ static hdf5::lite::GroupInfo groupInfo_(coda_oss::filesystem::path filename, std return retval; } -hdf5::lite::GroupInfo hdf5::lite::groupInfo(coda_oss::filesystem::path filename, std::string loc) +hdf5::lite::GroupInfo hdf5::lite::groupInfo(const coda_oss::filesystem::path& filename, const std::string& loc) { return details::try_catch_H5Exceptions(groupInfo_, __FILE__, __LINE__, filename, loc); } -hdf5::lite::FileInfo hdf5::lite::fileInfo(coda_oss::filesystem::path filename) +hdf5::lite::FileInfo hdf5::lite::fileInfo(const coda_oss::filesystem::path& filename) { hdf5::lite::FileInfo retval; hdf5::lite::GroupInfo& retval_ = retval; @@ -185,7 +185,7 @@ static hdf5::lite::Class H5T_class_to_Class(const H5::DataSet& dataset) } // https://docs.hdfgroup.org/archive/support/HDF5/doc1.8/cpplus_RM/readdata_8cpp-example.html -static hdf5::lite::DatasetInfo datasetInfo_(coda_oss::filesystem::path filename, std::string loc) +static hdf5::lite::DatasetInfo datasetInfo_(const coda_oss::filesystem::path& filename, const std::string& loc) { hdf5::lite::DatasetInfo retval; retval.filename = filename.string(); @@ -206,7 +206,7 @@ static hdf5::lite::DatasetInfo datasetInfo_(coda_oss::filesystem::path filename, return retval; } -hdf5::lite::DatasetInfo hdf5::lite::datasetInfo(coda_oss::filesystem::path filename, std::string loc) +hdf5::lite::DatasetInfo hdf5::lite::datasetInfo(const coda_oss::filesystem::path& filename, const std::string& loc) { return details::try_catch_H5Exceptions(datasetInfo_, __FILE__, __LINE__, filename, loc); } diff --git a/modules/c++/hdf5.lite/source/Read.cpp b/modules/c++/hdf5.lite/source/Read.cpp index ddc098365..04219e003 100644 --- a/modules/c++/hdf5.lite/source/Read.cpp +++ b/modules/c++/hdf5.lite/source/Read.cpp @@ -68,13 +68,13 @@ static types::RowCol readFile_(const coda_oss::filesystem::path& fileNam return readDataset_(dataset, result); } -types::RowCol hdf5::lite::readFile(coda_oss::filesystem::path fileName, std::string datasetName, +types::RowCol hdf5::lite::readFile(const coda_oss::filesystem::path& fileName, const std::string& loc, std::vector& result) { - return details::try_catch_H5Exceptions(readFile_, __FILE__, __LINE__, fileName, datasetName, result); + return details::try_catch_H5Exceptions(readFile_, __FILE__, __LINE__, fileName, loc, result); } -types::RowCol hdf5::lite::readFile(coda_oss::filesystem::path fileName, std::string datasetName, +types::RowCol hdf5::lite::readFile(const coda_oss::filesystem::path& fileName, const std::string& loc, std::vector& result) { - return details::try_catch_H5Exceptions(readFile_, __FILE__, __LINE__, fileName, datasetName, result); + return details::try_catch_H5Exceptions(readFile_, __FILE__, __LINE__, fileName, loc, result); }