From 3a96c775db2c079c67378602e06a46f0b46eb6ea Mon Sep 17 00:00:00 2001 From: fgenesis Date: Tue, 2 Jan 2018 15:31:47 +0100 Subject: [PATCH] work around dev warning message; fix compiler warning --- Aquaria/AquariaComboBox.cpp | 2 +- Aquaria/DSQ.cpp | 4 ++-- Aquaria/DSQ.h | 2 +- Aquaria/ScriptInterface.cpp | 4 ++-- BBGE/Core.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Aquaria/AquariaComboBox.cpp b/Aquaria/AquariaComboBox.cpp index 611635c..a1c4707 100644 --- a/Aquaria/AquariaComboBox.cpp +++ b/Aquaria/AquariaComboBox.cpp @@ -272,7 +272,7 @@ void AquariaComboBox::close(float t) } if (t>0) - dsq->run(t); + dsq->run(t, true); for(size_t i = 0; i < shownItems.size(); i++) { diff --git a/Aquaria/DSQ.cpp b/Aquaria/DSQ.cpp index 0fb6f63..25df9ba 100644 --- a/Aquaria/DSQ.cpp +++ b/Aquaria/DSQ.cpp @@ -3617,9 +3617,9 @@ bool DSQ::isQuitFlag() return watchQuitFlag; } -void DSQ::run(float runTime /* = -1 */) +void DSQ::run(float runTime /* = -1 */, bool skipRecurseCheck) { - if(isDeveloperKeys() && isNested()) + if(isDeveloperKeys() && isNested() && !skipRecurseCheck) errorLog("Warning: Nesting recursive main()"); Core::run(runTime); diff --git a/Aquaria/DSQ.h b/Aquaria/DSQ.h index 2ef8248..b23f82b 100644 --- a/Aquaria/DSQ.h +++ b/Aquaria/DSQ.h @@ -353,7 +353,7 @@ public: void rumble(float leftMotor, float rightMotor, float time, int source, InputDevice device); void vision(std::string folder, int num, bool ignoreMusic = false); - void run(float runTime = -1); // same as Core::run() but with recursion check + void run(float runTime = -1, bool skipRecurseCheck = false); // same as Core::run() but with recursion check void watch(float t, int canQuit = 0); std::string lastVoiceFile; diff --git a/Aquaria/ScriptInterface.cpp b/Aquaria/ScriptInterface.cpp index c451223..d82344b 100644 --- a/Aquaria/ScriptInterface.cpp +++ b/Aquaria/ScriptInterface.cpp @@ -7878,8 +7878,8 @@ static size_t _entityFilterT(lua_State *L, F& func) const Entity *ignore = lua_isuserdata(L, 4) ? entity(L, 4) : NULL; const EntityType et = lua_isnumber(L, 5) ? (EntityType)lua_tointeger(L, 5) : ET_NOTYPE; const DamageType dt = lua_isnumber(L, 6) ? (DamageType)lua_tointeger(L, 6) : DT_NONE; - const unsigned lrStart = lua_isnumber(L, 7) ? lua_tointeger(L, 7) : -1; - const unsigned lrEnd = lua_isnumber(L, 8) ? lua_tointeger(L, 8) : -1; + const int lrStart = lua_isnumber(L, 7) ? lua_tointeger(L, 7) : -1; + const int lrEnd = lua_isnumber(L, 8) ? lua_tointeger(L, 8) : -1; const float sqrRadius = radius * radius; float distsq; diff --git a/BBGE/Core.h b/BBGE/Core.h index e1d6289..90cbd36 100644 --- a/BBGE/Core.h +++ b/BBGE/Core.h @@ -529,7 +529,7 @@ protected: void setupFileAccess(); std::string _extraDataDir; - std::vector actionStatus; + std::vector actionStatus; // contains at least 1 element (the sentinel) virtual void updateActionButtons(); void clearActionButtons();