From 70ef686a88dc46fb73cd874cf14d78d27018b6f2 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Fri, 5 Mar 2021 17:25:54 -0500 Subject: [PATCH] Fixed clang-tidy performance-unnecessary-value-param warnings --- c++/src/H5DcreatProp.cpp | 4 ++-- c++/src/H5DcreatProp.h | 2 +- c++/test/dsets.cpp | 2 +- c++/test/h5cpputil.cpp | 4 ++-- c++/test/h5cpputil.h | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index d670b74263d..71195958eb3 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -769,8 +769,8 @@ DSetCreatPropList::setVirtual(const DataSpace &vspace, const char *src_fname, co // Programmer Binh-Minh Ribler - Mar, 2017 //-------------------------------------------------------------------------- void -DSetCreatPropList::setVirtual(const DataSpace &vspace, const H5std_string src_fname, - const H5std_string src_dsname, const DataSpace &sspace) const +DSetCreatPropList::setVirtual(const DataSpace &vspace, const H5std_string& src_fname, + const H5std_string& src_dsname, const DataSpace &sspace) const { setVirtual(vspace, src_fname.c_str(), src_dsname.c_str(), sspace); } diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h index 3c032ee5c6d..a0a734dab0b 100644 --- a/c++/src/H5DcreatProp.h +++ b/c++/src/H5DcreatProp.h @@ -123,7 +123,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList { // Maps elements of a virtual dataset to elements of the source dataset. void setVirtual(const DataSpace &vspace, const char *src_fname, const char *src_dsname, const DataSpace &sspace) const; - void setVirtual(const DataSpace &vspace, const H5std_string src_fname, const H5std_string src_dsname, + void setVirtual(const DataSpace &vspace, const H5std_string& src_fname, const H5std_string& src_dsname, const DataSpace &sspace) const; ///\brief Returns this class name. diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 03e49277613..2835a1bc7b2 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -1161,7 +1161,7 @@ const int RANK1 = 1; const H5std_string FILE_ACCPLIST("test_accplist.h5"); static herr_t -test_chunk_cache(FileAccPropList fapl) +test_chunk_cache(const FileAccPropList& fapl) { SUBTEST("DSetAccPropList::set/getChunkCache"); diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp index e38b34ad936..564c678e9ec 100644 --- a/c++/test/h5cpputil.cpp +++ b/c++/test/h5cpputil.cpp @@ -216,7 +216,7 @@ InvalidActionException::InvalidActionException() : Exception() {} // func - IN: Name of the function where failure should occur // message - IN: Message //-------------------------------------------------------------------------- -InvalidActionException::InvalidActionException(const H5std_string func, const H5std_string message) +InvalidActionException::InvalidActionException(const H5std_string& func, const H5std_string& message) : Exception(func, message) { } @@ -241,7 +241,7 @@ TestFailedException::TestFailedException() : Exception() {} // func - IN: Name of the function where failure should occur // message - IN: Message //-------------------------------------------------------------------------- -TestFailedException::TestFailedException(const H5std_string func, const H5std_string message) +TestFailedException::TestFailedException(const H5std_string& func, const H5std_string& message) : Exception(func, message) { } diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h index 4439ae3f661..266847a1278 100644 --- a/c++/test/h5cpputil.h +++ b/c++/test/h5cpputil.h @@ -48,14 +48,14 @@ void issue_fail_msg(const char *where, int line, const char *file_name, const ch class InvalidActionException : public Exception { public: - InvalidActionException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG); + InvalidActionException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); InvalidActionException(); virtual ~InvalidActionException() throw(); }; class TestFailedException : public Exception { public: - TestFailedException(const H5std_string func_name, const H5std_string message = DEFAULT_MSG); + TestFailedException(const H5std_string& func_name, const H5std_string& message = DEFAULT_MSG); TestFailedException(); virtual ~TestFailedException() throw(); };