Corrected unnnecessary const restriction on returned std::string

This commit is contained in:
Perry Kundert 2017-10-04 10:21:55 -07:00
parent 97a388802d
commit e0d890cc23

View file

@ -2656,9 +2656,9 @@ scan_number_done:
int get() int get()
{ {
++chars_read; ++chars_read;
int c = current = ia->get_character(); current = ia->get_character();
token_string.push_back(static_cast<char>(c)); token_string.push_back(static_cast<char>(current));
return c; return current;
} }
/// unget current character (return it again on next get) /// unget current character (return it again on next get)
@ -2703,7 +2703,7 @@ scan_number_done:
} }
/// return string value /// return string value
const std::string get_string() std::string get_string()
{ {
return std::move( yytext ); return std::move( yytext );
} }