Commit f775922c by Perry Kundert

Specify initializers for yytest, token_string using initializer-lists

o We can retain -Weffc++ and specify default initializers by using initializer lists. The risks are low (of additional non-conformat compilers), because there is already one other such initialization used in the code-base.
parent 546e148b
......@@ -2833,29 +2833,30 @@ scan_number_done:
private:
/// input adapter
detail::input_adapter_t ia = nullptr;
detail::input_adapter_t ia { nullptr };
/// the current character
int current = std::char_traits<char>::eof();
int current { std::char_traits<char>::eof() };
/// the number of characters read
std::size_t chars_read = 0;
std::size_t chars_read { 0 };
/// raw input token string (for error messages)
std::vector<char> token_string = std::vector<char>();
std::vector<char> token_string { };
/// buffer for variable-length tokens (numbers, strings)
std::string yytext = "";
std::string yytext { };
/// a description of occurred lexer errors
const char* error_message = "";
const char* error_message { "" };
// number values
number_integer_t value_integer = 0;
number_unsigned_t value_unsigned = 0;
number_float_t value_float = 0;
number_integer_t value_integer { 0 };
number_unsigned_t value_unsigned { 0 };
number_float_t value_float { 0 };
/// the decimal point
const char decimal_point_char = '.';
const char decimal_point_char { '.' };
};
/*!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment