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

summaryrefslogtreecommitdiff
path: root/source/game/StarItemDrop.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/game/StarItemDrop.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/game/StarItemDrop.cpp')
-rw-r--r--source/game/StarItemDrop.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/game/StarItemDrop.cpp b/source/game/StarItemDrop.cpp
index fa3c984..e7eec81 100644
--- a/source/game/StarItemDrop.cpp
+++ b/source/game/StarItemDrop.cpp
@@ -69,7 +69,7 @@ ItemDropPtr ItemDrop::throwDrop(ItemDescriptor const& itemDescriptor, Vec2F cons
ItemDrop::ItemDrop(ItemPtr item)
: ItemDrop() {
- m_item = move(item);
+ m_item = std::move(item);
updateCollisionPoly();
@@ -94,7 +94,7 @@ ItemDrop::ItemDrop(Json const& diskStore)
ItemDrop::ItemDrop(ByteArray store)
: ItemDrop() {
- DataStreamBuffer ds(move(store));
+ DataStreamBuffer ds(std::move(store));
Root::singleton().itemDatabase()->loadItem(ds.read<ItemDescriptor>(), m_item);
ds.read(m_eternal);
@@ -151,7 +151,7 @@ pair<ByteArray, uint64_t> ItemDrop::writeNetState(uint64_t fromVersion) {
}
void ItemDrop::readNetState(ByteArray data, float interpolationTime) {
- m_netGroup.readNetState(move(data), interpolationTime);
+ m_netGroup.readNetState(std::move(data), interpolationTime);
}
void ItemDrop::enableInterpolation(float extrapolationHint) {
@@ -292,7 +292,7 @@ void ItemDrop::render(RenderCallback* renderCallback) {
auto drawable = Drawable::makeLine(line, width, beamColor, position());
(drawable.linePart().endColor = beamColor)->setAlphaF(0.0f);
drawable.fullbright = true;
- renderCallback->addDrawable(move(drawable), RenderLayerItemDrop);
+ renderCallback->addDrawable(std::move(drawable), RenderLayerItemDrop);
}
if (!m_drawables) {
@@ -314,7 +314,7 @@ void ItemDrop::render(RenderCallback* renderCallback) {
Vec2F dropPosition = position();
for (Drawable drawable : *m_drawables) {
drawable.position += dropPosition;
- renderCallback->addDrawable(move(drawable), renderLayer);
+ renderCallback->addDrawable(std::move(drawable), renderLayer);
}
}
@@ -323,7 +323,7 @@ void ItemDrop::renderLightSources(RenderCallback* renderCallback) {
light.pointLight = false;
light.color = Vec3B::filled(20);
light.position = position();
- renderCallback->addLightSource(move(light));
+ renderCallback->addLightSource(std::move(light));
}