diff --git a/.clang-tidy b/.clang-tidy index 3969eb5559b..e9d1b50ac1a 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,4 @@ --- -Checks: '-*,bugprone-move-forwarding-reference,bugprone-use-after-move,cppcoreguidelines-rvalue-reference-param-not-moved,modernize-use-nullptr,performance-move-const-arg,performance-unnecessary-value-param' +Checks: '-*,bugprone-move-forwarding-reference,bugprone-use-after-move,cppcoreguidelines-rvalue-reference-param-not-moved,modernize-use-nullptr,performance-move-const-arg,performance-move-constructor-init,performance-unnecessary-value-param'' WarningsAsErrors: true ... diff --git a/src/map/label.cpp b/src/map/label.cpp index 9cf65bb5fc3..dbcb4b08d9c 100644 --- a/src/map/label.cpp +++ b/src/map/label.cpp @@ -361,10 +361,10 @@ terrain_label::terrain_label(const map_labels& parent, const config& cfg) terrain_label::terrain_label(terrain_label&& l) : handle_(l.handle_) , tooltip_handle_(l.tooltip_handle_) - , text_(l.text_) - , tooltip_(l.tooltip_) - , category_(l.category_) - , team_name_(l.team_name_) + , text_(std::move(l.text_)) + , tooltip_(std::move(l.tooltip_)) + , category_(std::move(l.category_)) + , team_name_(std::move(l.team_name_)) , visible_in_fog_(l.visible_in_fog_) , visible_in_shroud_(l.visible_in_shroud_) , immutable_(l.immutable_) diff --git a/src/units/abilities.cpp b/src/units/abilities.cpp index 8daa9abde39..9d7f2fc9c25 100644 --- a/src/units/abilities.cpp +++ b/src/units/abilities.cpp @@ -1225,7 +1225,7 @@ attack_type::specials_context_t::~specials_context_t() } attack_type::specials_context_t::specials_context_t(attack_type::specials_context_t&& other) - : parent(other.parent) + : parent(std::move(other.parent)) { other.was_moved = true; }