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

summaryrefslogtreecommitdiff
path: root/source/windowing/StarGuiContext.cpp
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/windowing/StarGuiContext.cpp
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/windowing/StarGuiContext.cpp')
-rw-r--r--source/windowing/StarGuiContext.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/windowing/StarGuiContext.cpp b/source/windowing/StarGuiContext.cpp
index 028614a..d1be94a 100644
--- a/source/windowing/StarGuiContext.cpp
+++ b/source/windowing/StarGuiContext.cpp
@@ -26,8 +26,8 @@ GuiContext::GuiContext(MixerPtr mixer, ApplicationControllerPtr appController) {
s_singleton = this;
- m_mixer = move(mixer);
- m_applicationController = move(appController);
+ m_mixer = std::move(mixer);
+ m_applicationController = std::move(appController);
m_interfaceScale = 1;
@@ -41,7 +41,7 @@ GuiContext::~GuiContext() {
}
void GuiContext::renderInit(RendererPtr renderer) {
- m_renderer = move(renderer);
+ m_renderer = std::move(renderer);
auto textureGroup = m_renderer->createTextureGroup();
m_textureCollection = make_shared<AssetTextureGroup>(textureGroup);
m_drawablePainter = make_shared<DrawablePainter>(m_renderer, m_textureCollection);
@@ -197,7 +197,7 @@ void GuiContext::drawTriangles(List<tuple<Vec2F, Vec2F, Vec2F>> const& triangles
}
void GuiContext::drawInterfaceDrawable(Drawable drawable, Vec2F const& screenPos, Vec4B const& color) {
- drawDrawable(move(drawable), screenPos * interfaceScale(), (float)interfaceScale(), color);
+ drawDrawable(std::move(drawable), screenPos * interfaceScale(), (float)interfaceScale(), color);
}
void GuiContext::drawInterfaceLine(Vec2F const& begin, Vec2F const end, Vec4B const& color, float lineWidth) {
@@ -428,7 +428,7 @@ void GuiContext::playAudio(String const& audioAsset, int loops, float volume, fl
audioInstance->setVolume(volume);
audioInstance->setPitchMultiplier(pitch);
audioInstance->setLoops(loops);
- m_mixer->play(move(audioInstance));
+ m_mixer->play(std::move(audioInstance));
}
String GuiContext::getClipboard() const {
@@ -436,7 +436,7 @@ String GuiContext::getClipboard() const {
}
void GuiContext::setClipboard(String text) {
- m_applicationController->setClipboard(move(text));
+ m_applicationController->setClipboard(std::move(text));
}
void GuiContext::cleanup() {