build, treewide: enable -Wpessimizing-move warning

This warning prevents using std::move() where it can hurt
- on an unnamed temporary or a named automatic variable being
returned from a function. In both cases the value could be
constructed directly in its final destination, but std::move()
prevents it.

Fix the handful of cases (all trivial), and enable the warning.

Closes #8992
This commit is contained in:
Avi Kivity
2021-07-08 16:36:27 +03:00
committed by Nadav Har'El
parent fe4002c6c4
commit 9059514335
28 changed files with 42 additions and 43 deletions

View File

@@ -143,7 +143,7 @@ class build_progress_virtual_reader {
_previous_clustering_key = ck;
mf = mutation_fragment(*_schema, _permit, clustering_row(
std::move(ck),
std::move(scylla_in_progress_row.tomb()),
scylla_in_progress_row.tomb(),
std::move(scylla_in_progress_row.marker()),
std::move(legacy_in_progress_row)));
} else if (mf.is_range_tombstone()) {