diff --git a/include/llmr/style/style_parser.hpp b/include/llmr/style/style_parser.hpp index 7c7d0a70a..c00c49677 100644 --- a/include/llmr/style/style_parser.hpp +++ b/include/llmr/style/style_parser.hpp @@ -41,7 +41,7 @@ private: bool parseBoolean(JSVal value); std::string parseString(JSVal value); - const JSVal& replaceConstant(const JSVal& value); + JSVal replaceConstant(JSVal value); std::vector parseArray(JSVal value, uint16_t expected_count); Color parseColor(JSVal value); Value parseValue(JSVal value); diff --git a/src/style/style_parser.cpp b/src/style/style_parser.cpp index 0e914964e..83d0eb256 100644 --- a/src/style/style_parser.cpp +++ b/src/style/style_parser.cpp @@ -379,7 +379,7 @@ std::string StyleParser::parseString(JSVal value) { return { value.GetString(), value.GetStringLength() }; } -const JSVal& StyleParser::replaceConstant(const JSVal& value) { +JSVal StyleParser::replaceConstant(JSVal value) { if (value.IsString()) { const std::string string_value { value.GetString(), value.GetStringLength() }; auto it = constants.find(string_value);