Fix cppcheck issues: passedByValue
This commit is contained in:
parent
989acd18c7
commit
c43d998457
@ -101,7 +101,7 @@ Jzon::Node& recursivelyBuildTree(Jzon::Node& root,Tokens& tokens,size_t k)
|
||||
}
|
||||
|
||||
// build the json tree for this key. return location and discover the name
|
||||
Jzon::Node& objectForKey(const std::string Key,Jzon::Object& root,std::string& name,Exiv2::StringSet* pNS=NULL)
|
||||
Jzon::Node& objectForKey(const std::string& Key,Jzon::Object& root,std::string& name,Exiv2::StringSet* pNS=NULL)
|
||||
{
|
||||
// Parse the key
|
||||
Tokens tokens ;
|
||||
@ -351,4 +351,4 @@ int main(int argc, char* const argv[])
|
||||
std::cout << "Caught Exiv2 exception '" << e.what() << "'\n";
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -467,7 +467,7 @@ string getExifTime(const time_t t)
|
||||
return result ;
|
||||
}
|
||||
|
||||
std::string makePath(std::string dir,std::string file)
|
||||
std::string makePath(const std::string& dir, const std::string& file)
|
||||
{
|
||||
return dir + std::string(EXV_SEPARATOR_STR) + file ;
|
||||
}
|
||||
@ -607,7 +607,7 @@ bool readImage(const char* path,Options& /* options */)
|
||||
return bResult ;
|
||||
}
|
||||
|
||||
time_t readImageTime(std::string path,std::string* pS=NULL)
|
||||
time_t readImageTime(const std::string& path,std::string* pS=NULL)
|
||||
{
|
||||
using namespace Exiv2;
|
||||
|
||||
@ -753,7 +753,7 @@ int parseTZ(const char* adjust)
|
||||
return (3600*h)+(60*m);
|
||||
}
|
||||
|
||||
bool mySort(std::string a,std::string b)
|
||||
bool mySort(const std::string& a, const std::string& b)
|
||||
{
|
||||
time_t A = readImageTime(a);
|
||||
time_t B = readImageTime(b);
|
||||
|
||||
@ -247,7 +247,7 @@ void Params::usage(std::ostream& os) const
|
||||
<< _("Manipulate the Exif metadata of images.\n");
|
||||
}
|
||||
|
||||
std::string Params::printTarget(std::string before,int target,bool bPrint,std::ostream& out)
|
||||
std::string Params::printTarget(const std::string &before, int target, bool bPrint, std::ostream& out)
|
||||
{
|
||||
std::string t;
|
||||
if ( target & Params::ctExif ) t+= 'e';
|
||||
|
||||
@ -344,7 +344,7 @@ public:
|
||||
void version(bool verbose =false, std::ostream& os =std::cout) const;
|
||||
|
||||
//! Print target_
|
||||
static std::string printTarget(std::string before,int target,bool bPrint=false,std::ostream& os=std::cout);
|
||||
static std::string printTarget(const std::string& before,int target,bool bPrint=false,std::ostream& os=std::cout);
|
||||
|
||||
//! getStdin binary data read from stdin to DataBuf
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user