diff --git a/dbms/src/Common/Macros.cpp b/dbms/src/Common/Macros.cpp index 3681a544388..5d111abb0c6 100644 --- a/dbms/src/Common/Macros.cpp +++ b/dbms/src/Common/Macros.cpp @@ -69,13 +69,14 @@ String Macros::expand(const String & s, size_t level) const return expand(res, level + 1); } -Names Macros::expand(const Names & s, size_t level) const +Names Macros::expand(const Names & source_names, size_t level) const { - Names names; + Names result_names; + result_names.reserve(source_names.size()); - for (const String name : s) - names.push_back(expand(name, level)); + for (const String & name : source_names) + result_names.push_back(expand(name, level)); - return names; + return result_names; } }