From 431a9c00a56cf4c603be1cf5f773b193621d8150 Mon Sep 17 00:00:00 2001 From: Kai Blaschke Date: Mon, 19 Feb 2024 16:55:19 +0100 Subject: Fixed a huge amount of Clang warnings On Linux and macOS, using Clang to compile OpenStarbound produces about 400 MB worth of warnings during the build, making the compiler output unreadable and slowing the build down considerably. 99% of the warnings were unqualified uses of std::move and std::forward, which are now all properly qualified. Fixed a few other minor warnings about non-virtual destructors and some uses of std::move preventing copy elision on temporary objects. Most remaining warnings are now unused parameters. --- source/core/StarSpatialHash2D.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/core/StarSpatialHash2D.hpp') diff --git a/source/core/StarSpatialHash2D.hpp b/source/core/StarSpatialHash2D.hpp index 2241dfd..87f70e3 100644 --- a/source/core/StarSpatialHash2D.hpp +++ b/source/core/StarSpatialHash2D.hpp @@ -239,19 +239,19 @@ void SpatialHash2D::set(Key con template void SpatialHash2D::set(Key const& key, Coord const& pos, Value value) { - set(key, {Rect(pos, pos)}, move(value)); + set(key, {Rect(pos, pos)}, std::move(value)); } template void SpatialHash2D::set(Key const& key, Rect const& rect, Value value) { - set(key, {rect}, move(value)); + set(key, {rect}, std::move(value)); } template template void SpatialHash2D::set(Key const& key, RectCollection const& rects, Value value) { Entry& entry = m_entryMap[key]; - entry.value = move(value); + entry.value = std::move(value); updateSpatial(&entry, rects); } @@ -262,7 +262,7 @@ auto SpatialHash2D::remove(Key return {}; removeSpatial(&iter->second); - Maybe val = move(iter->second.value); + Maybe val = std::move(iter->second.value); m_entryMap.erase(iter); return val; } -- cgit v1.2.3