Skip to content

Commit

Permalink
Remove a magic number (#3888)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann authored Dec 18, 2022
1 parent 885aa00 commit 2ca8dab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/nlohmann/detail/output/serializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ class serializer
: (0xFFu >> type) & (byte);

const std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);
JSON_ASSERT(index < 400);
JSON_ASSERT(index < utf8d.size());
state = utf8d[index];
return state;
}
Expand Down
2 changes: 1 addition & 1 deletion single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18849,7 +18849,7 @@ class serializer
: (0xFFu >> type) & (byte);

const std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);
JSON_ASSERT(index < 400);
JSON_ASSERT(index < utf8d.size());
state = utf8d[index];
return state;
}
Expand Down

0 comments on commit 2ca8dab

Please sign in to comment.