Skip to content

Commit

Permalink
Fixed clang-tidy performance-unnecessary-value-param warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
seanm committed Mar 9, 2021
1 parent 5ffd86c commit 70ef686
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions c++/src/H5DcreatProp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion c++/src/H5DcreatProp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion c++/test/dsets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
4 changes: 2 additions & 2 deletions c++/test/h5cpputil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
}
Expand All @@ -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)
{
}
Expand Down
4 changes: 2 additions & 2 deletions c++/test/h5cpputil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};
Expand Down

0 comments on commit 70ef686

Please sign in to comment.