Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarSectorArray2D.hpp
diff options
context:
space:
mode:
authorKai Blaschke <kai.blaschke@kb-dev.net>2024-02-19 16:55:19 +0100
committerKai Blaschke <kai.blaschke@kb-dev.net>2024-02-19 16:55:19 +0100
commit431a9c00a56cf4c603be1cf5f773b193621d8150 (patch)
tree95843aeea9fb6dc18279ee05ff6961f40b19798f /source/core/StarSectorArray2D.hpp
parent30e1871d3f44629e00a1f66d8164e3e62c7f889f (diff)
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.
Diffstat (limited to 'source/core/StarSectorArray2D.hpp')
-rw-r--r--source/core/StarSectorArray2D.hpp14
1 files changed, 7 insertions, 7 deletions
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<ElementT, SectorSize>::sector(Sector const& id) const -> Arra
template <typename ElementT, size_t SectorSize>
void SectorArray2D<ElementT, SectorSize>::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 ElementT, size_t SectorSize>
typename SectorArray2D<ElementT, SectorSize>::ArrayPtr SectorArray2D<ElementT, SectorSize>::copySector(
Sector const& id) {
if (auto const& array = m_sectors(id))
- return make_unique<Array>(*array);
+ return std::make_unique<Array>(*array);
else
return {};
}
@@ -235,7 +235,7 @@ typename SectorArray2D<ElementT, SectorSize>::ArrayPtr SectorArray2D<ElementT, S
ArrayPtr ret;
m_loadedSectors.remove(id);
std::swap(m_sectors(id[0], id[1]), ret);
- return move(ret);
+ return std::move(ret);
}
template <typename ElementT, size_t SectorSize>
@@ -268,14 +268,14 @@ template <typename ElementT, size_t SectorSize>
template <typename Function>
bool SectorArray2D<ElementT, SectorSize>::eval(
size_t minX, size_t minY, size_t width, size_t height, Function&& function, bool evalEmpty) const {
- return const_cast<SectorArray2D*>(this)->evalPriv(minX, minY, width, height, forward<Function>(function), evalEmpty);
+ return const_cast<SectorArray2D*>(this)->evalPriv(minX, minY, width, height, std::forward<Function>(function), evalEmpty);
}
template <typename ElementT, size_t SectorSize>
template <typename Function>
bool SectorArray2D<ElementT, SectorSize>::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>(function), evalEmpty);
+ return evalPriv(minX, minY, width, height, std::forward<Function>(function), evalEmpty);
}
template <typename ElementT, size_t SectorSize>
@@ -283,14 +283,14 @@ template <typename Function>
bool SectorArray2D<ElementT, SectorSize>::evalColumns(
size_t minX, size_t minY, size_t width, size_t height, Function&& function, bool evalEmpty) const {
return const_cast<SectorArray2D*>(this)->evalColumnsPriv(
- minX, minY, width, height, forward<Function>(function), evalEmpty);
+ minX, minY, width, height, std::forward<Function>(function), evalEmpty);
}
template <typename ElementT, size_t SectorSize>
template <typename Function>
bool SectorArray2D<ElementT, SectorSize>::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>(function), evalEmpty);
+ return evalColumnsPriv(minX, minY, width, height, std::forward<Function>(function), evalEmpty);
}
template <typename ElementT, size_t SectorSize>