diff --git a/src/sort.cpp b/src/sort.cpp index 3f13f9201..df71a1804 100644 --- a/src/sort.cpp +++ b/src/sort.cpp @@ -242,7 +242,7 @@ static bool sort_compare (int left, int right) // UDAs. else if ((column = Context::getContext ().columns[field]) != nullptr) { - std::string type = column->type (); + const std::string& type = column->type (); if (type == "numeric") { auto left_real = strtof (((*global_data)[left].get_ref (field)).c_str (), nullptr);