Skip to content

Commit

Permalink
Merge 'treewide: remove implicitly deleted copy ctor and assignment o…
Browse files Browse the repository at this point in the history
…perator' from Kefu Chai

clang 17 trunk helped to identify these issues. so let's fix them.

Closes scylladb#12842

* github.com:scylladb/scylladb:
  row_cache: drop defaulted move assignment operator
  utils/histogram: drop defaulted copy ctor and assignment operator
  range_tombstone_list: remove defaulted move assignment operator
  query-result: remove implicitly deleted copy ctor
  • Loading branch information
avikivity committed Feb 14, 2023
2 parents 4f5a460 + 8954223 commit df497a5
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion mutation/range_tombstone_list.hh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ class range_tombstone_list final {
revert();
}
reverter(reverter&&) = default;
reverter& operator=(reverter&&) = default;
reverter(const reverter&) = delete;
reverter& operator=(reverter&) = delete;
virtual range_tombstones_type::iterator insert(range_tombstones_type::iterator it, range_tombstone_entry& new_rt);
Expand Down
2 changes: 0 additions & 2 deletions query-result.hh
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,7 @@ public:
w.reduce_chunk_count();
}
result(result&&) = default;
result(const result&) = default;
result& operator=(result&&) = default;
result& operator=(const result&) = default;

const bytes_ostream& buf() const {
return _w;
Expand Down
1 change: 0 additions & 1 deletion row_cache.hh
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ public:
row_cache(schema_ptr, snapshot_source, cache_tracker&, is_continuous = is_continuous::no);
row_cache(row_cache&&) = default;
row_cache(const row_cache&) = delete;
row_cache& operator=(row_cache&&) = default;
public:
// Implements mutation_source for this cache, see mutation_reader.hh
// User needs to ensure that the row_cache object stays alive
Expand Down
4 changes: 0 additions & 4 deletions utils/histogram.hh
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,7 @@ public:
timed_rate_moving_average met;
timed_rate_moving_average_and_histogram() = default;
timed_rate_moving_average_and_histogram(timed_rate_moving_average_and_histogram&&) = default;
timed_rate_moving_average_and_histogram(const timed_rate_moving_average_and_histogram&) = default;
timed_rate_moving_average_and_histogram(size_t size, int64_t _sample_mask = 0x80) : hist(size, _sample_mask) {}
timed_rate_moving_average_and_histogram& operator=(const timed_rate_moving_average_and_histogram&) = default;

template <typename Rep, typename Ratio>
void mark(std::chrono::duration<Rep, Ratio> dur) {
Expand Down Expand Up @@ -505,7 +503,6 @@ public:
}

timed_rate_moving_average_summary_and_histogram(timed_rate_moving_average_summary_and_histogram&&) = default;
timed_rate_moving_average_summary_and_histogram(const timed_rate_moving_average_summary_and_histogram&) = default;
timed_rate_moving_average_summary_and_histogram(size_t size) : _timer([this]{
_rates.update();
_last_update++;
Expand All @@ -515,7 +512,6 @@ public:
_last_update = 0;
_summary.update();}), hist(size, 0) {
}
timed_rate_moving_average_summary_and_histogram& operator=(const timed_rate_moving_average_summary_and_histogram&) = default;

template <typename Rep, typename Ratio>
void mark(std::chrono::duration<Rep, Ratio> dur) noexcept {
Expand Down

0 comments on commit df497a5

Please sign in to comment.