Skip to content

Commit aadee42

Browse files
committed
get ref to string instead of copy in TelegramOptions constructor
1 parent 4748ac2 commit aadee42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vpr/src/server/telegramoptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ TelegramOptions::TelegramOptions(const std::string& data, const std::vector<std:
1515
for (const std::string& optionStr: options) {
1616
std::vector<std::string> fragments = vtr::split(optionStr, ":");
1717
if (fragments.size() == TOTAL_INDEXES_NUM) {
18-
std::string name = fragments[INDEX_NAME];
18+
const std::string& name = fragments[INDEX_NAME];
1919
Option option{fragments[INDEX_TYPE], fragments[INDEX_VALUE]};
2020
if (isDataTypeSupported(option.type)) {
2121
m_options[name] = option;

0 commit comments

Comments
 (0)