Fix 2 warnings reported by GCC
authorLoic Blot <loic.blot@unix-experience.fr>
Mon, 19 Jun 2017 22:04:18 +0000 (00:04 +0200)
committerLoic Blot <loic.blot@unix-experience.fr>
Mon, 19 Jun 2017 22:04:18 +0000 (00:04 +0200)
* ClientEnvironment::m_irr is not used anymore since a recent cleanup
* l_vmanip constructor ordering

src/client.cpp
src/clientenvironment.cpp
src/clientenvironment.h
src/script/lua_api/l_vmanip.cpp

index 9892e08cd7f9d0310eee0fc103242afb2fe33202..ebe1d9c8ff5ce76c6db5bc11ec26699ccb56cdd9 100644 (file)
@@ -81,7 +81,7 @@ Client::Client(
                        device->getSceneManager()->getRootSceneNode(),
                        device->getSceneManager(), 666),
                device->getSceneManager(),
-               tsrc, this, device
+               tsrc, this
        ),
        m_particle_manager(&m_env),
        m_con(PROTOCOL_ID, 512, CONNECTION_TIMEOUT, ipv6, this),
index e6b273086f220185541781ccafd5908bb36ff709..e0398a06211997f40a8c64af9b7ea9fced4d18de 100644 (file)
@@ -37,14 +37,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 ClientEnvironment::ClientEnvironment(ClientMap *map, scene::ISceneManager *smgr,
-       ITextureSource *texturesource, Client *client,
-       IrrlichtDevice *irr):
+       ITextureSource *texturesource, Client *client):
        Environment(client),
        m_map(map),
        m_smgr(smgr),
        m_texturesource(texturesource),
-       m_client(client),
-       m_irr(irr)
+       m_client(client)
 {
        char zero = 0;
        memset(attachement_parent_ids, zero, sizeof(attachement_parent_ids));
index c8b192ee99b889d972bdd60c9d0f98525bddb674..9d893766bed5d0eb6761987036c7a638cb4da4ed 100644 (file)
@@ -20,7 +20,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #ifndef CLIENT_ENVIRONMENT_HEADER
 #define CLIENT_ENVIRONMENT_HEADER
 
-#include <IrrlichtDevice.h>
 #include <ISceneManager.h>
 #include "environment.h"
 #include "clientobject.h"
@@ -69,8 +68,7 @@ class ClientEnvironment : public Environment
 {
 public:
        ClientEnvironment(ClientMap *map, scene::ISceneManager *smgr,
-               ITextureSource *texturesource, Client *client,
-               IrrlichtDevice *device);
+               ITextureSource *texturesource, Client *client);
        ~ClientEnvironment();
 
        Map & getMap();
@@ -181,7 +179,6 @@ private:
        ITextureSource *m_texturesource;
        Client *m_client;
        ClientScripting *m_script = nullptr;
-       IrrlichtDevice *m_irr;
        ClientActiveObjectMap m_active_objects;
        std::vector<ClientSimpleObject*> m_simple_objects;
        std::queue<ClientEnvEvent> m_client_event_queue;
index ed5042bcfd0cd585c432a16a1f47538e8436b684..9e482873bdf55f625f05db3af5a7834070fdbe29 100644 (file)
@@ -365,7 +365,9 @@ int LuaVoxelManip::l_get_emerged_area(lua_State *L)
        return 2;
 }
 
-LuaVoxelManip::LuaVoxelManip(MMVManip *mmvm, bool is_mg_vm) : vm(mmvm), is_mapgen_vm(is_mg_vm)
+LuaVoxelManip::LuaVoxelManip(MMVManip *mmvm, bool is_mg_vm) :
+       is_mapgen_vm(is_mg_vm),
+       vm(mmvm)
 {
 }