mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 08:03:45 +01:00
Fix some warnings (#12615)
This commit is contained in:
parent
6a269d58ef
commit
a871115889
@ -846,7 +846,6 @@ private:
|
|||||||
|
|
||||||
EventManager *eventmgr = nullptr;
|
EventManager *eventmgr = nullptr;
|
||||||
QuicktuneShortcutter *quicktune = nullptr;
|
QuicktuneShortcutter *quicktune = nullptr;
|
||||||
bool registration_confirmation_shown = false;
|
|
||||||
|
|
||||||
std::unique_ptr<GameUI> m_game_ui;
|
std::unique_ptr<GameUI> m_game_ui;
|
||||||
GUIChatConsole *gui_chat_console = nullptr; // Free using ->Drop()
|
GUIChatConsole *gui_chat_console = nullptr; // Free using ->Drop()
|
||||||
|
@ -1174,7 +1174,7 @@ void PartialMeshBuffer::beforeDraw() const
|
|||||||
void PartialMeshBuffer::afterDraw() const
|
void PartialMeshBuffer::afterDraw() const
|
||||||
{
|
{
|
||||||
// Take the data back
|
// Take the data back
|
||||||
m_vertex_indexes = std::move(m_buffer->Indices.steal());
|
m_vertex_indexes = m_buffer->Indices.steal();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -39,7 +39,6 @@ struct ClientTexture
|
|||||||
video::ITexture *ref = nullptr;
|
video::ITexture *ref = nullptr;
|
||||||
|
|
||||||
ClientTexture() = default;
|
ClientTexture() = default;
|
||||||
ClientTexture(const ClientTexture&) = default;
|
|
||||||
ClientTexture(const ServerParticleTexture& p, ITextureSource *t):
|
ClientTexture(const ServerParticleTexture& p, ITextureSource *t):
|
||||||
tex(p),
|
tex(p),
|
||||||
ref(t->getTextureForMesh(p.string)) {};
|
ref(t->getTextureForMesh(p.string)) {};
|
||||||
@ -52,7 +51,6 @@ struct ClientTexRef
|
|||||||
ParticleTexture* tex = nullptr;
|
ParticleTexture* tex = nullptr;
|
||||||
video::ITexture* ref = nullptr;
|
video::ITexture* ref = nullptr;
|
||||||
ClientTexRef() = default;
|
ClientTexRef() = default;
|
||||||
ClientTexRef(const ClientTexRef&) = default;
|
|
||||||
|
|
||||||
/* constructor used by particles spawned from a spawner */
|
/* constructor used by particles spawned from a spawner */
|
||||||
ClientTexRef(ClientTexture& t):
|
ClientTexRef(ClientTexture& t):
|
||||||
|
@ -504,7 +504,7 @@ EmergeThread *EmergeManager::getOptimalThread()
|
|||||||
|
|
||||||
void EmergeManager::reportCompletedEmerge(EmergeAction action)
|
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();
|
m_completed_emerge_counter[(int)action]->increment();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,8 +108,10 @@ void Server::handleCommand_Init(NetworkPacket* pkt)
|
|||||||
// Use the highest version supported by both
|
// Use the highest version supported by both
|
||||||
u8 depl_serial_v = std::min(client_max, our_max);
|
u8 depl_serial_v = std::min(client_max, our_max);
|
||||||
// If it's lower than the lowest supported, give up.
|
// 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)
|
if (depl_serial_v < SER_FMT_VER_LOWEST_READ)
|
||||||
depl_serial_v = SER_FMT_VER_INVALID;
|
depl_serial_v = SER_FMT_VER_INVALID;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (depl_serial_v == SER_FMT_VER_INVALID) {
|
if (depl_serial_v == SER_FMT_VER_INVALID) {
|
||||||
actionstream << "Server: A mismatched client tried to connect from " <<
|
actionstream << "Server: A mismatched client tried to connect from " <<
|
||||||
|
@ -95,7 +95,7 @@ namespace ParticleParamTypes
|
|||||||
using This = Parameter<T, PN>;
|
using This = Parameter<T, PN>;
|
||||||
|
|
||||||
Parameter() = default;
|
Parameter() = default;
|
||||||
Parameter(const This& a) = default;
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
Parameter(Args... args) : val(args...) {}
|
Parameter(Args... args) : val(args...) {}
|
||||||
|
|
||||||
@ -165,7 +165,6 @@ namespace ParticleParamTypes
|
|||||||
f32 bias = 0;
|
f32 bias = 0;
|
||||||
|
|
||||||
RangedParameter() = default;
|
RangedParameter() = default;
|
||||||
RangedParameter(const This& a) = default;
|
|
||||||
RangedParameter(T _min, T _max) : min(_min), max(_max) {}
|
RangedParameter(T _min, T _max) : min(_min), max(_max) {}
|
||||||
template <typename M> RangedParameter(M b) : min(b), max(b) {}
|
template <typename M> RangedParameter(M b) : min(b), max(b) {}
|
||||||
|
|
||||||
@ -245,7 +244,6 @@ namespace ParticleParamTypes
|
|||||||
T start, end;
|
T start, end;
|
||||||
|
|
||||||
TweenedParameter() = default;
|
TweenedParameter() = default;
|
||||||
TweenedParameter(const This& a) = default;
|
|
||||||
TweenedParameter(T _start, T _end) : start(_start), end(_end) {}
|
TweenedParameter(T _start, T _end) : start(_start), end(_end) {}
|
||||||
template <typename M> TweenedParameter(M b) : start(b), end(b) {}
|
template <typename M> TweenedParameter(M b) : start(b), end(b) {}
|
||||||
|
|
||||||
|
@ -568,7 +568,7 @@ void script_dump_packed(const PackedValue *val)
|
|||||||
printf("table(%d, %d)", i.uidata1, i.uidata2);
|
printf("table(%d, %d)", i.uidata1, i.uidata2);
|
||||||
break;
|
break;
|
||||||
case LUA_TFUNCTION:
|
case LUA_TFUNCTION:
|
||||||
printf("function(%d byte)", i.sdata.size());
|
printf("function(%lu byte)", i.sdata.size());
|
||||||
break;
|
break;
|
||||||
case LUA_TUSERDATA:
|
case LUA_TUSERDATA:
|
||||||
printf("userdata %s %p", i.sdata.c_str(), i.ptrdata);
|
printf("userdata %s %p", i.sdata.c_str(), i.ptrdata);
|
||||||
|
@ -226,15 +226,18 @@ namespace LuaParticleParams
|
|||||||
|
|
||||||
// get the effect settings
|
// get the effect settings
|
||||||
lua_getfield(L, -1, "style");
|
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_pop(L, 1);
|
||||||
|
|
||||||
lua_getfield(L, -1, "reps");
|
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_pop(L, 1);
|
||||||
|
|
||||||
lua_getfield(L, -1, "start");
|
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);
|
lua_pop(L, 1);
|
||||||
|
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -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
|
// 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
|
// 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++) {
|
for (auto it = mods.crbegin(); it != mods.crend(); it++) {
|
||||||
const ModSpec &spec = *it;
|
const ModSpec &spec = *it;
|
||||||
fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "textures");
|
fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "textures");
|
||||||
|
Loading…
Reference in New Issue
Block a user