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/StarSectorArray2D.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/core/StarSectorArray2D.hpp') diff --git a/source/core/StarSectorArray2D.hpp b/source/core/StarSectorArray2D.hpp index 4645804..870881f 100644 --- a/source/core/StarSectorArray2D.hpp +++ b/source/core/StarSectorArray2D.hpp @@ -213,7 +213,7 @@ auto SectorArray2D::sector(Sector const& id) const -> Arra template void SectorArray2D::loadSector(Sector const& id, ArrayPtr array) { auto& data = m_sectors(id[0], id[1]); - data = move(array); + data = std::move(array); if (data) m_loadedSectors.add(id); else @@ -224,7 +224,7 @@ template typename SectorArray2D::ArrayPtr SectorArray2D::copySector( Sector const& id) { if (auto const& array = m_sectors(id)) - return make_unique(*array); + return std::make_unique(*array); else return {}; } @@ -235,7 +235,7 @@ typename SectorArray2D::ArrayPtr SectorArray2D @@ -268,14 +268,14 @@ template template bool SectorArray2D::eval( size_t minX, size_t minY, size_t width, size_t height, Function&& function, bool evalEmpty) const { - return const_cast(this)->evalPriv(minX, minY, width, height, forward(function), evalEmpty); + return const_cast(this)->evalPriv(minX, minY, width, height, std::forward(function), evalEmpty); } template template bool SectorArray2D::eval( size_t minX, size_t minY, size_t width, size_t height, Function&& function, bool evalEmpty) { - return evalPriv(minX, minY, width, height, forward(function), evalEmpty); + return evalPriv(minX, minY, width, height, std::forward(function), evalEmpty); } template @@ -283,14 +283,14 @@ template bool SectorArray2D::evalColumns( size_t minX, size_t minY, size_t width, size_t height, Function&& function, bool evalEmpty) const { return const_cast(this)->evalColumnsPriv( - minX, minY, width, height, forward(function), evalEmpty); + minX, minY, width, height, std::forward(function), evalEmpty); } template template bool SectorArray2D::evalColumns( size_t minX, size_t minY, size_t width, size_t height, Function&& function, bool evalEmpty) { - return evalColumnsPriv(minX, minY, width, height, forward(function), evalEmpty); + return evalColumnsPriv(minX, minY, width, height, std::forward(function), evalEmpty); } template -- cgit v1.2.3