aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/game.cpp1
-rw-r--r--src/client/mapblock_mesh.cpp2
-rw-r--r--src/client/particles.h2
-rw-r--r--src/emerge.cpp2
-rw-r--r--src/network/serverpackethandler.cpp2
-rw-r--r--src/particles.h4
-rw-r--r--src/script/common/c_packer.cpp2
-rw-r--r--src/script/lua_api/l_particleparams.h9
-rw-r--r--src/server/mods.cpp2
9 files changed, 13 insertions, 13 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 61b957e78..c34e3a415 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -846,7 +846,6 @@ private:
EventManager *eventmgr = nullptr;
QuicktuneShortcutter *quicktune = nullptr;
- bool registration_confirmation_shown = false;
std::unique_ptr<GameUI> m_game_ui;
GUIChatConsole *gui_chat_console = nullptr; // Free using ->Drop()
diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp
index d8a8c25eb..c730b9bf9 100644
--- a/src/client/mapblock_mesh.cpp
+++ b/src/client/mapblock_mesh.cpp
@@ -1174,7 +1174,7 @@ void PartialMeshBuffer::beforeDraw() const
void PartialMeshBuffer::afterDraw() const
{
// Take the data back
- m_vertex_indexes = std::move(m_buffer->Indices.steal());
+ m_vertex_indexes = m_buffer->Indices.steal();
}
/*
diff --git a/src/client/particles.h b/src/client/particles.h
index 36be903f1..0818b796b 100644
--- a/src/client/particles.h
+++ b/src/client/particles.h
@@ -39,7 +39,6 @@ struct ClientTexture
video::ITexture *ref = nullptr;
ClientTexture() = default;
- ClientTexture(const ClientTexture&) = default;
ClientTexture(const ServerParticleTexture& p, ITextureSource *t):
tex(p),
ref(t->getTextureForMesh(p.string)) {};
@@ -52,7 +51,6 @@ struct ClientTexRef
ParticleTexture* tex = nullptr;
video::ITexture* ref = nullptr;
ClientTexRef() = default;
- ClientTexRef(const ClientTexRef&) = default;
/* constructor used by particles spawned from a spawner */
ClientTexRef(ClientTexture& t):
diff --git a/src/emerge.cpp b/src/emerge.cpp
index e36d36448..3e42742f6 100644
--- a/src/emerge.cpp
+++ b/src/emerge.cpp
@@ -504,7 +504,7 @@ EmergeThread *EmergeManager::getOptimalThread()
void EmergeManager::reportCompletedEmerge(EmergeAction action)
{
- assert((int)action < ARRLEN(m_completed_emerge_counter));
+ assert((size_t)action < ARRLEN(m_completed_emerge_counter));
m_completed_emerge_counter[(int)action]->increment();
}
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index 4b9de488c..a5ee81a9c 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -108,8 +108,10 @@ void Server::handleCommand_Init(NetworkPacket* pkt)
// Use the highest version supported by both
u8 depl_serial_v = std::min(client_max, our_max);
// If it's lower than the lowest supported, give up.
+#if SER_FMT_VER_LOWEST_READ > 0
if (depl_serial_v < SER_FMT_VER_LOWEST_READ)
depl_serial_v = SER_FMT_VER_INVALID;
+#endif
if (depl_serial_v == SER_FMT_VER_INVALID) {
actionstream << "Server: A mismatched client tried to connect from " <<
diff --git a/src/particles.h b/src/particles.h
index 622fee099..74bfa7fce 100644
--- a/src/particles.h
+++ b/src/particles.h
@@ -95,7 +95,7 @@ namespace ParticleParamTypes
using This = Parameter<T, PN>;
Parameter() = default;
- Parameter(const This& a) = default;
+
template <typename... Args>
Parameter(Args... args) : val(args...) {}
@@ -165,7 +165,6 @@ namespace ParticleParamTypes
f32 bias = 0;
RangedParameter() = default;
- RangedParameter(const This& a) = default;
RangedParameter(T _min, T _max) : min(_min), max(_max) {}
template <typename M> RangedParameter(M b) : min(b), max(b) {}
@@ -245,7 +244,6 @@ namespace ParticleParamTypes
T start, end;
TweenedParameter() = default;
- TweenedParameter(const This& a) = default;
TweenedParameter(T _start, T _end) : start(_start), end(_end) {}
template <typename M> TweenedParameter(M b) : start(b), end(b) {}
diff --git a/src/script/common/c_packer.cpp b/src/script/common/c_packer.cpp
index ede00c758..597f5e447 100644
--- a/src/script/common/c_packer.cpp
+++ b/src/script/common/c_packer.cpp
@@ -568,7 +568,7 @@ void script_dump_packed(const PackedValue *val)
printf("table(%d, %d)", i.uidata1, i.uidata2);
break;
case LUA_TFUNCTION:
- printf("function(%d byte)", i.sdata.size());
+ printf("function(%lu byte)", i.sdata.size());
break;
case LUA_TUSERDATA:
printf("userdata %s %p", i.sdata.c_str(), i.ptrdata);
diff --git a/src/script/lua_api/l_particleparams.h b/src/script/lua_api/l_particleparams.h
index 4fefc5e3a..03f11c07f 100644
--- a/src/script/lua_api/l_particleparams.h
+++ b/src/script/lua_api/l_particleparams.h
@@ -226,15 +226,18 @@ namespace LuaParticleParams
// get the effect settings
lua_getfield(L, -1, "style");
- lua_isnil(L,-1) || (readLuaValue(L, field.style), true);
+ if (!lua_isnil(L,-1))
+ readLuaValue(L, field.style);
lua_pop(L, 1);
lua_getfield(L, -1, "reps");
- lua_isnil(L,-1) || (readLuaValue(L, field.reps), true);
+ if (!lua_isnil(L,-1))
+ readLuaValue(L, field.reps);
lua_pop(L, 1);
lua_getfield(L, -1, "start");
- lua_isnil(L,-1) || (readLuaValue(L, field.beginning), true);
+ if (!lua_isnil(L,-1))
+ readLuaValue(L, field.beginning);
lua_pop(L, 1);
goto done;
diff --git a/src/server/mods.cpp b/src/server/mods.cpp
index 0e9bf4911..f302d4240 100644
--- a/src/server/mods.cpp
+++ b/src/server/mods.cpp
@@ -96,7 +96,7 @@ void ServerModManager::getModsMediaPaths(std::vector<std::string> &paths) const
{
// Iterate mods in reverse load order: Media loading expects higher priority media files first
// and mods loading later should be able to override media of already loaded mods
- const auto mods = configuration.getMods();
+ const auto &mods = configuration.getMods();
for (auto it = mods.crbegin(); it != mods.crend(); it++) {
const ModSpec &spec = *it;
fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "textures");