🏁 fix MSVC 2015 compilation

parent bf2e714e
...@@ -1450,18 +1450,18 @@ scan_number_done: ...@@ -1450,18 +1450,18 @@ scan_number_done:
// literals // literals
case 't': case 't':
{ {
char_type true_literal[] = "true"; std::array<char_type, 4> true_literal = {{'t', 'r', 'u', 'e'}};
return scan_literal(true_literal, 4, token_type::literal_true); return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true);
} }
case 'f': case 'f':
{ {
char_type false_literal[] = "false"; std::array<char_type, 5> false_literal = {{'f', 'a', 'l', 's', 'e'}};
return scan_literal(false_literal, 5, token_type::literal_false); return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false);
} }
case 'n': case 'n':
{ {
char_type null_literal[] = "null"; std::array<char_type, 4> null_literal = {{'n', 'u', 'l', 'l'}};
return scan_literal(null_literal, 4, token_type::literal_null); return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null);
} }
// string // string
......
...@@ -9514,18 +9514,18 @@ scan_number_done: ...@@ -9514,18 +9514,18 @@ scan_number_done:
// literals // literals
case 't': case 't':
{ {
char_type true_literal[] = "true"; std::array<char_type, 4> true_literal = {{'t', 'r', 'u', 'e'}};
return scan_literal(true_literal, 4, token_type::literal_true); return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true);
} }
case 'f': case 'f':
{ {
char_type false_literal[] = "false"; std::array<char_type, 5> false_literal = {{'f', 'a', 'l', 's', 'e'}};
return scan_literal(false_literal, 5, token_type::literal_false); return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false);
} }
case 'n': case 'n':
{ {
char_type null_literal[] = "null"; std::array<char_type, 4> null_literal = {{'n', 'u', 'l', 'l'}};
return scan_literal(null_literal, 4, token_type::literal_null); return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null);
} }
// string // string
......
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