Skip to content

Commit

Permalink
Remove zeroes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhksB authored Jan 25, 2024
1 parent 701c086 commit 7daa367
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/nlohmann/detail/input/lexer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1550,17 +1550,17 @@ class lexer : public lexer_base<BasicJsonType>
// literals
case 't':
{
std::array<char_type, 8> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e'), 0, 0, 0, 0}};
std::array<char_type, 8> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}};
return scan_literal(true_literal.data(), 4, token_type::literal_true);
}
case 'f':
{
std::array<char_type, 8> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e'), 0, 0, 0}};
std::array<char_type, 8> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}};
return scan_literal(false_literal.data(), 5, token_type::literal_false);
}
case 'n':
{
std::array<char_type, 8> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l'), 0, 0, 0, 0}};
std::array<char_type, 8> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}};
return scan_literal(null_literal.data(), 4, token_type::literal_null);
}

Expand Down

0 comments on commit 7daa367

Please sign in to comment.