Skip to content

Commit fdbae9f

Browse files
committed
Optimize for RVO
1 parent b2fe6b7 commit fdbae9f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

libs/common/src/System_Other.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ boost::filesystem::path System::getHomePath()
3232

3333
std::string System::getUserName()
3434
{
35-
const std::string name = getEnvVar("USER");
35+
std::string name = getEnvVar("USER");
3636
if(name.empty())
3737
throw std::runtime_error("Could not get username");
3838
return name;

libs/common/src/Tokenizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ std::string Tokenizer::next()
3333
return "";
3434

3535
const auto newPos = data.find_first_of(delimiter, curPos);
36-
const auto result = data.substr(curPos, newPos - curPos);
36+
auto result = data.substr(curPos, newPos - curPos);
3737

3838
curPos = (newPos == std::string::npos) ? newPos : newPos + 1;
3939
return result;

0 commit comments

Comments
 (0)