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/frontend/StarChatBubbleSeparation.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/frontend/StarChatBubbleSeparation.hpp') diff --git a/source/frontend/StarChatBubbleSeparation.hpp b/source/frontend/StarChatBubbleSeparation.hpp index 4bbf018..dfe5167 100644 --- a/source/frontend/StarChatBubbleSeparation.hpp +++ b/source/frontend/StarChatBubbleSeparation.hpp @@ -112,7 +112,7 @@ void BubbleSeparator::addBubble(Vec2F position, RectF boundBox, T contents, u Vec2F separatedOffset = separated.min() - boundBox.min(); Vec2F separatedPosition = position + separatedOffset; Bubble bubble = Bubble{ contents, position, position, boundBox, separatedOffset, separated, separatedOffset, separatedPosition }; - m_bubbles.insertSorted(move(bubble), &BubbleSeparator::compareBubbleY); + m_bubbles.insertSorted(std::move(bubble), &BubbleSeparator::compareBubbleY); } template @@ -136,8 +136,8 @@ template void BubbleSeparator::forEach(function func) { bool anyMoved = false; - List> leftEdges = move(m_sortedLeftEdges); - List> rightEdges = move(m_sortedRightEdges); + List> leftEdges = std::move(m_sortedLeftEdges); + List> rightEdges = std::move(m_sortedRightEdges); m_bubbles.exec([this, func, &anyMoved, &leftEdges, &rightEdges](Bubble& bubble) { RectF oldBoundBox = bubble.boundBox; -- cgit v1.2.3