Skip to content

Commit

Permalink
Take string argument by const&
Browse files Browse the repository at this point in the history
  • Loading branch information
ZedThree committed Feb 23, 2022
1 parent 6b1ae26 commit e8de071
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cxx4/ncGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ map<string,NcGroup> NcGroup::getCoordVars(NcGroup::Location location) const {
}

// Get the NcDim and NcVar object pair for a named coordinate variables.
void NcGroup::getCoordVar(string& coordVarName, NcDim& ncDim, NcVar& ncVar, NcGroup::Location location) const {
void NcGroup::getCoordVar(const string& coordVarName, NcDim& ncDim, NcVar& ncVar, NcGroup::Location location) const {

// search in current group and parent groups.
multimap<string,NcDim>::iterator itD;
Expand Down
2 changes: 1 addition & 1 deletion cxx4/ncGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ namespace netCDF
\param location Enumeration type controlling the groups to search.
\return The set of names of dimension variables.
*/
void getCoordVar(std::string& coordVarName, NcDim& ncDim, NcVar& ncVar, NcGroup::Location location=Current) const;
void getCoordVar(const std::string& coordVarName, NcDim& ncDim, NcVar& ncVar, NcGroup::Location location=Current) const;


protected:
Expand Down

0 comments on commit e8de071

Please sign in to comment.