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/rendering/StarTilePainter.cpp | |
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/rendering/StarTilePainter.cpp')
-rw-r--r-- | source/rendering/StarTilePainter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/rendering/StarTilePainter.cpp b/source/rendering/StarTilePainter.cpp index 5655930..31fe0a6 100644 --- a/source/rendering/StarTilePainter.cpp +++ b/source/rendering/StarTilePainter.cpp @@ -11,7 +11,7 @@ namespace Star { TilePainter::TilePainter(RendererPtr renderer) : TileDrawer() { - m_renderer = move(renderer); + m_renderer = std::move(renderer); m_textureGroup = m_renderer->createTextureGroup(TextureGroupSize::Large); auto& root = Root::singleton(); @@ -190,7 +190,7 @@ shared_ptr<TilePainter::TerrainChunk const> TilePainter::getTerrainChunk(WorldRe for (auto& zLevelPair : layerPair.second) { auto rb = m_renderer->createRenderBuffer(); rb->set(zLevelPair.second); - (*chunk)[layerPair.first][zLevelPair.first] = move(rb); + (*chunk)[layerPair.first][zLevelPair.first] = std::move(rb); } } @@ -214,7 +214,7 @@ shared_ptr<TilePainter::LiquidChunk const> TilePainter::getLiquidChunk(WorldRend for (auto& p : liquidPrimitives) { auto rb = m_renderer->createRenderBuffer(); rb->set(p.second); - chunk->set(p.first, move(rb)); + chunk->set(p.first, std::move(rb)); } return chunk; @@ -296,7 +296,7 @@ bool TilePainter::produceTerrainPrimitives(HashMap<QuadZLevel, List<RenderPrimit if (!variant) continue; RectF textureCoords = variant->wrap(variance); RectF worldCoords = RectF::withSize(piecePair.second / TilePixels + Vec2F(pos), textureCoords.size() / TilePixels); - quadList.emplace_back(std::in_place_type_t<RenderQuad>(), move(texture), + quadList.emplace_back(std::in_place_type_t<RenderQuad>(), std::move(texture), worldCoords .min(), textureCoords.min(), Vec2F( worldCoords.xMax(), worldCoords.yMin()), @@ -323,7 +323,7 @@ bool TilePainter::produceTerrainPrimitives(HashMap<QuadZLevel, List<RenderPrimit if (!variant) continue; auto& textureCoords = variant->wrap(variance); RectF worldCoords = RectF::withSize(piecePair.second / TilePixels + Vec2F(pos), textureCoords.size() / TilePixels); - quadList.emplace_back(std::in_place_type_t<RenderQuad>(), move(texture), + quadList.emplace_back(std::in_place_type_t<RenderQuad>(), std::move(texture), worldCoords.min(), textureCoords.min(), Vec2F(worldCoords.xMax(), worldCoords.yMin()), Vec2F(textureCoords.xMax(), textureCoords.yMin()), worldCoords.max(), textureCoords.max(), @@ -343,7 +343,7 @@ bool TilePainter::produceTerrainPrimitives(HashMap<QuadZLevel, List<RenderPrimit RectF textureCoords = RectF::withSize(Vec2F(), textureSize); RectF worldCoords = RectF::withSize(crackingImage.second / TilePixels + Vec2F(pos), textureCoords.size() / TilePixels); - quadList.emplace_back(std::in_place_type_t<RenderQuad>(), move(texture), + quadList.emplace_back(std::in_place_type_t<RenderQuad>(), std::move(texture), worldCoords.min(), textureCoords.min(), Vec2F(worldCoords.xMax(), worldCoords.yMin()), Vec2F(textureCoords.xMax(), textureCoords.yMin()), worldCoords.max(), textureCoords.max(), |