diff --git a/sstables/compress.cc b/sstables/compress.cc index 7e25c2be42..fa775b6522 100644 --- a/sstables/compress.cc +++ b/sstables/compress.cc @@ -294,11 +294,12 @@ void compression::set_compressor(compressor_ptr c) { unqualified_name uqn(compressor::namespace_prefix, c->name()); const sstring& cn = uqn; name.value = bytes(cn.begin(), cn.end()); - for (auto& p : c->options()) { - if (p.first != compression_parameters::SSTABLE_COMPRESSION) { - auto& k = p.first; - auto& v = p.second; - options.elements.push_back({bytes(k.begin(), k.end()), bytes(v.begin(), v.end())}); + for (auto& [k, v] : c->options()) { + if (k != compression_parameters::SSTABLE_COMPRESSION) { + options.elements.push_back({ + {bytes(k.begin(), k.end())}, + {bytes(v.begin(), v.end())} + }); } } } @@ -573,7 +574,7 @@ inline output_stream make_compressed_file_output_stream(output_streamoptions.elements.push_back({"crc_check_chance", "1.0"}); + cm->options.elements.push_back({{"crc_check_chance"}, {"1.0"}}); return output_stream(compressed_file_data_sink(std::move(out), cm, p)); } diff --git a/sstables/sstables.cc b/sstables/sstables.cc index 0c7df2b61d..594e2289bd 100644 --- a/sstables/sstables.cc +++ b/sstables/sstables.cc @@ -1711,8 +1711,8 @@ create_sharding_metadata(schema_ptr schema, const dht::decorated_key& first_key, auto&& right_token = right.token(); auto right_exclusive = !right.has_key() && right.bound() == dht::ring_position::token_bound::start; sm.token_ranges.elements.push_back(disk_token_range{ - {left_exclusive, left_token.data()}, - {right_exclusive, right_token.data()}}); + {left_exclusive, {left_token.data()}}, + {right_exclusive, {right_token.data()}}}); } } return sm;