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/windowing/StarLabelWidget.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/windowing/StarLabelWidget.cpp')
-rw-r--r-- | source/windowing/StarLabelWidget.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/windowing/StarLabelWidget.cpp b/source/windowing/StarLabelWidget.cpp index b55ecc1..35f8618 100644 --- a/source/windowing/StarLabelWidget.cpp +++ b/source/windowing/StarLabelWidget.cpp @@ -10,18 +10,18 @@ LabelWidget::LabelWidget(String text, VerticalAnchor const& vAnchor, Maybe<unsigned> wrapWidth, Maybe<float> lineSpacing) - : m_color(color), + : m_fontMode(FontMode::Normal), + m_color(color), m_hAnchor(hAnchor), m_vAnchor(vAnchor), - m_wrapWidth(move(wrapWidth)), - m_lineSpacing(move(lineSpacing)), - m_fontMode(FontMode::Normal) { + m_wrapWidth(std::move(wrapWidth)), + m_lineSpacing(std::move(lineSpacing)) { auto assets = Root::singleton().assets(); auto fontConfig = assets->json("/interface.config:font"); m_fontSize = fontConfig.getInt("baseSize"); m_processingDirectives = fontConfig.getString("defaultDirectives"); m_font = fontConfig.queryString("defaultFont", ""); - setText(move(text)); + setText(std::move(text)); } String const& LabelWidget::text() const { @@ -33,7 +33,7 @@ Maybe<unsigned> LabelWidget::getTextCharLimit() const { } void LabelWidget::setText(String newText) { - m_text = move(newText); + m_text = std::move(newText); updateTextRegion(); } @@ -47,7 +47,7 @@ void LabelWidget::setFontMode(FontMode fontMode) { } void LabelWidget::setColor(Color newColor) { - m_color = move(newColor); + m_color = std::move(newColor); } void LabelWidget::setAnchor(HorizontalAnchor hAnchor, VerticalAnchor vAnchor) { @@ -57,12 +57,12 @@ void LabelWidget::setAnchor(HorizontalAnchor hAnchor, VerticalAnchor vAnchor) { } void LabelWidget::setWrapWidth(Maybe<unsigned> wrapWidth) { - m_wrapWidth = move(wrapWidth); + m_wrapWidth = std::move(wrapWidth); updateTextRegion(); } void LabelWidget::setLineSpacing(Maybe<float> lineSpacing) { - m_lineSpacing = move(lineSpacing); + m_lineSpacing = std::move(lineSpacing); updateTextRegion(); } |