@@ -331,7 +331,7 @@ static std::vector<std::string> split(const std::string &str, const std::string
331
331
return ret;
332
332
}
333
333
334
- static std::string getDumpFileName (const Settings& settings, const std::string& filename, std::string cfgHash = " " )
334
+ static std::string getDumpFileName (const Settings& settings, const std::string& filename, const std::string & cfgHash = " " )
335
335
{
336
336
std::string extension;
337
337
if ((settings.dump || !settings.buildDir .empty ()) && !cfgHash.empty ())
@@ -353,7 +353,7 @@ static void createDumpFile(const Settings& settings,
353
353
const FileWithDetails& file,
354
354
std::ofstream& fdump,
355
355
std::string& dumpFile,
356
- std::string cfgHash = " " )
356
+ const std::string & cfgHash = " " )
357
357
{
358
358
if (!settings.dump && settings.addons .empty ())
359
359
return ;
@@ -849,7 +849,7 @@ static std::size_t calculateHash(const Preprocessor& preprocessor, const simplec
849
849
return preprocessor.calculateHash (tokens, toolinfo.str ());
850
850
}
851
851
852
- unsigned int CppCheck::checkFile (const FileWithDetails& file, const std::string &cfgname, std::string cfgHash, std::istream* fileStream)
852
+ unsigned int CppCheck::checkFile (const FileWithDetails& file, const std::string &cfgname, const std::string & cfgHash, std::istream* fileStream)
853
853
{
854
854
// TODO: move to constructor when CppCheck no longer owns the settings
855
855
if (mSettings .checks .isEnabled (Checks::unusedFunction) && !mUnusedFunctionsCheck )
0 commit comments