Skip to content

Commit 18f0c72

Browse files
committed
[ci] more ubuntu ci test fixes
1 parent f787024 commit 18f0c72

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

include/nlohmann/detail/input/binary_reader.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2984,11 +2984,11 @@ class binary_reader
29842984

29852985
struct field_data_t
29862986
{
2987-
std::vector<string_t> strings{};
2988-
std::vector<bool> bools{};
2989-
std::vector<std::int64_t> integers{};
2990-
std::vector<std::uint64_t> unsigneds{};
2991-
std::vector<double> floats{};
2987+
std::vector<string_t> strings;
2988+
std::vector<bool> bools;
2989+
std::vector<std::int64_t> integers;
2990+
std::vector<std::uint64_t> unsigneds;
2991+
std::vector<double> floats;
29922992
};
29932993

29942994
std::vector<field_data_t> field_data(nf);

include/nlohmann/detail/output/binary_writer.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ class binary_writer
7474
int type_marker{};
7575
bjdata_soa_string_encoding_t str_enc{bjdata_soa_string_encoding_t::fixed};
7676
std::size_t str_fixed_len{};
77-
std::vector<std::size_t> str_indices{};
78-
std::vector<string_t> str_dict{};
79-
std::vector<std::size_t> str_offsets{};
80-
string_t str_buffer{};
77+
std::vector<std::size_t> str_indices;
78+
std::vector<string_t> str_dict;
79+
std::vector<std::size_t> str_offsets;
80+
string_t str_buffer;
8181
};
8282

8383
public:
@@ -1937,7 +1937,7 @@ class binary_writer
19371937
std::size_t fixed_cost = max_len * arr.size();
19381938

19391939
// Dict cost
1940-
std::size_t idx_size;
1940+
std::size_t idx_size = 0;
19411941
if (unique_count <= 255)
19421942
{
19431943
idx_size = 1;
@@ -1953,7 +1953,7 @@ class binary_writer
19531953
std::size_t dict_cost = (idx_size * arr.size()) + total_len + (unique_count * 2);
19541954

19551955
// Offset cost
1956-
std::size_t off_size;
1956+
std::size_t off_size = 0;
19571957
if (total_len <= 255)
19581958
{
19591959
off_size = 1;
@@ -2052,7 +2052,7 @@ class binary_writer
20522052
{
20532053
// Write index
20542054
auto it = std::find(field.str_dict.begin(), field.str_dict.end(), value);
2055-
std::size_t idx = static_cast<std::size_t>(std::distance(field.str_dict.begin(), it));
2055+
auto idx = static_cast<std::size_t>(std::distance(field.str_dict.begin(), it));
20562056

20572057
if (idx < 256)
20582058
{

single_include/nlohmann/json.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12822,11 +12822,11 @@ class binary_reader
1282212822

1282312823
struct field_data_t
1282412824
{
12825-
std::vector<string_t> strings{};
12826-
std::vector<bool> bools{};
12827-
std::vector<std::int64_t> integers{};
12828-
std::vector<std::uint64_t> unsigneds{};
12829-
std::vector<double> floats{};
12825+
std::vector<string_t> strings;
12826+
std::vector<bool> bools;
12827+
std::vector<std::int64_t> integers;
12828+
std::vector<std::uint64_t> unsigneds;
12829+
std::vector<double> floats;
1283012830
};
1283112831

1283212832
std::vector<field_data_t> field_data(nf);
@@ -16848,10 +16848,10 @@ class binary_writer
1684816848
int type_marker{};
1684916849
bjdata_soa_string_encoding_t str_enc{bjdata_soa_string_encoding_t::fixed};
1685016850
std::size_t str_fixed_len{};
16851-
std::vector<std::size_t> str_indices{};
16852-
std::vector<string_t> str_dict{};
16853-
std::vector<std::size_t> str_offsets{};
16854-
string_t str_buffer{};
16851+
std::vector<std::size_t> str_indices;
16852+
std::vector<string_t> str_dict;
16853+
std::vector<std::size_t> str_offsets;
16854+
string_t str_buffer;
1685516855
};
1685616856

1685716857
public:
@@ -18711,7 +18711,7 @@ class binary_writer
1871118711
std::size_t fixed_cost = max_len * arr.size();
1871218712

1871318713
// Dict cost
18714-
std::size_t idx_size;
18714+
std::size_t idx_size = 0;
1871518715
if (unique_count <= 255)
1871618716
{
1871718717
idx_size = 1;
@@ -18727,7 +18727,7 @@ class binary_writer
1872718727
std::size_t dict_cost = (idx_size * arr.size()) + total_len + (unique_count * 2);
1872818728

1872918729
// Offset cost
18730-
std::size_t off_size;
18730+
std::size_t off_size = 0;
1873118731
if (total_len <= 255)
1873218732
{
1873318733
off_size = 1;
@@ -18826,7 +18826,7 @@ class binary_writer
1882618826
{
1882718827
// Write index
1882818828
auto it = std::find(field.str_dict.begin(), field.str_dict.end(), value);
18829-
std::size_t idx = static_cast<std::size_t>(std::distance(field.str_dict.begin(), it));
18829+
auto idx = static_cast<std::size_t>(std::distance(field.str_dict.begin(), it));
1883018830

1883118831
if (idx < 256)
1883218832
{

0 commit comments

Comments
 (0)