Return non-const object to enable move compiler optimization (#966)

This commit is contained in:
Oleksandr Redko 2017-10-03 19:24:18 +03:00 committed by Daniel Marjamäki
parent 2545a628b2
commit 2bee664ec9
3 changed files with 3 additions and 3 deletions

View File

@ -944,7 +944,7 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck, int /*argc*/, const cha
#ifdef _WIN32
// fix trac ticket #439 'Cppcheck reports wrong filename for filenames containing 8-bit ASCII'
static inline const std::string ansiToOEM(const std::string &msg, bool doConvert)
static inline std::string ansiToOEM(const std::string &msg, bool doConvert)
{
if (doConvert) {
const unsigned msglength = msg.length();

View File

@ -126,7 +126,7 @@ std::string Path::getFilenameExtensionInLowerCase(const std::string &path)
return extension;
}
const std::string Path::getCurrentPath()
std::string Path::getCurrentPath()
{
char currentPath[4096];

View File

@ -101,7 +101,7 @@ public:
* @brief Returns the absolute path of current working directory
* @return absolute path of current working directory
*/
static const std::string getCurrentPath();
static std::string getCurrentPath();
/**
* @brief Check if given path is absolute