Skip to content

Commit

Permalink
Add explicit size to static arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
jk-jeon committed Mar 13, 2024
1 parent 74b5dac commit b14c18c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/dragonbox_to_chars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace jkj {
// These "//"'s are to prevent clang-format to ruin this nice alignment.
// Thanks to reddit user u/mcmcc:
// https://www.reddit.com/r/cpp/comments/so3wx9/dragonbox_110_is_released_a_fast_floattostring/hw8z26r/?context=3
static constexpr char radix_100_table[] JKJ_STATIC_DATA_SECTION = {
static constexpr char radix_100_table[200] JKJ_STATIC_DATA_SECTION = {
'0', '0', '0', '1', '0', '2', '0', '3', '0', '4', //
'0', '5', '0', '6', '0', '7', '0', '8', '0', '9', //
'1', '0', '1', '1', '1', '2', '1', '3', '1', '4', //
Expand All @@ -75,7 +75,7 @@ namespace jkj {
'9', '0', '9', '1', '9', '2', '9', '3', '9', '4', //
'9', '5', '9', '6', '9', '7', '9', '8', '9', '9' //
};
static constexpr char radix_100_head_table[] JKJ_STATIC_DATA_SECTION = {
static constexpr char radix_100_head_table[200] JKJ_STATIC_DATA_SECTION = {
'0', '.', '1', '.', '2', '.', '3', '.', '4', '.', //
'5', '.', '6', '.', '7', '.', '8', '.', '9', '.', //
'1', '.', '1', '.', '1', '.', '1', '.', '1', '.', //
Expand Down

0 comments on commit b14c18c

Please sign in to comment.