diff options
author | Kai Blaschke <kai.blaschke@kb-dev.net> | 2024-02-19 16:55:19 +0100 |
---|---|---|
committer | Kai Blaschke <kai.blaschke@kb-dev.net> | 2024-02-19 16:55:19 +0100 |
commit | 431a9c00a56cf4c603be1cf5f773b193621d8150 (patch) | |
tree | 95843aeea9fb6dc18279ee05ff6961f40b19798f /source/game/StarTileSectorArray.hpp | |
parent | 30e1871d3f44629e00a1f66d8164e3e62c7f889f (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/game/StarTileSectorArray.hpp')
-rw-r--r-- | source/game/StarTileSectorArray.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/game/StarTileSectorArray.hpp b/source/game/StarTileSectorArray.hpp index 40378db..fb96229 100644 --- a/source/game/StarTileSectorArray.hpp +++ b/source/game/StarTileSectorArray.hpp @@ -146,7 +146,7 @@ TileSectorArray<Tile, SectorSize>::TileSectorArray() {} template <typename Tile, unsigned SectorSize> TileSectorArray<Tile, SectorSize>::TileSectorArray(Vec2U const& size, Tile defaultTile) { - init(size, move(defaultTile)); + init(size, std::move(defaultTile)); } template <typename Tile, unsigned SectorSize> @@ -154,7 +154,7 @@ void TileSectorArray<Tile, SectorSize>::init(Vec2U const& size, Tile defaultTile m_worldSize = size; // Initialize to enough sectors to fit world size at least. m_tileSectors.init((size[0] + SectorSize - 1) / SectorSize, (size[1] + SectorSize - 1) / SectorSize); - m_default = move(defaultTile); + m_default = std::move(defaultTile); } template <typename Tile, unsigned SectorSize> @@ -210,13 +210,13 @@ auto TileSectorArray<Tile, SectorSize>::adjacentSector(Sector const& sector, Vec template <typename Tile, unsigned SectorSize> void TileSectorArray<Tile, SectorSize>::loadSector(Sector const& sector, ArrayPtr tile) { if (sectorValid(sector)) - m_tileSectors.loadSector(sector, move(tile)); + m_tileSectors.loadSector(sector, std::move(tile)); } template <typename Tile, unsigned SectorSize> void TileSectorArray<Tile, SectorSize>::loadDefaultSector(Sector const& sector) { if (sectorValid(sector)) - m_tileSectors.loadSector(sector, make_unique<Array>(m_default)); + m_tileSectors.loadSector(sector, std::make_unique<Array>(m_default)); } template <typename Tile, unsigned SectorSize> |