Fix warnings reported by clang
authorsfan5 <sfan5@live.de>
Sun, 6 Jul 2014 11:07:23 +0000 (13:07 +0200)
committersfan5 <sfan5@live.de>
Sun, 6 Jul 2014 11:19:21 +0000 (13:19 +0200)
src/clientobject.h
src/content_cao.h
src/jthread/jsemaphore.h
src/main.cpp
src/shader.cpp

index 233617b5c1c5ffc29f5267c60550c8f89c0a3849..cae551abc5740451fe77edb69ec00b2f7cbabe08 100644 (file)
@@ -61,27 +61,27 @@ public:
        virtual scene::IMeshSceneNode *getMeshSceneNode(){return NULL;}
        virtual scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode(){return NULL;}
        virtual scene::IBillboardSceneNode *getSpriteSceneNode(){return NULL;}
-       virtual bool isPlayer(){return false;}
-       virtual bool isLocalPlayer(){return false;}
+       virtual bool isPlayer() const {return false;}
+       virtual bool isLocalPlayer() const {return false;}
        virtual void setAttachments(){}
        virtual bool doShowSelectionBox(){return true;}
        virtual void updateCameraOffset(v3s16 camera_offset){};
-       
+
        // Step object in time
        virtual void step(float dtime, ClientEnvironment *env){}
-       
+
        // Process a message sent by the server side object
        virtual void processMessage(const std::string &data){}
 
        virtual std::string infoText() {return "";}
        virtual std::string debugInfoText() {return "";}
-       
+
        /*
                This takes the return value of
                ServerActiveObject::getClientInitializationData
        */
        virtual void initialize(const std::string &data){}
-       
+
        // Create a certain type of ClientActiveObject
        static ClientActiveObject* create(u8 type, IGameDef *gamedef,
                        ClientEnvironment *env);
@@ -120,4 +120,3 @@ struct DistanceSortedActiveObject
 };
 
 #endif
-
index bf27ed79ad8c3eac09cf50a9559c6ce46d623b54..bf1ac5b3fa02db8d7e03d8a78bb6ae2d1468ad63 100644 (file)
@@ -197,4 +197,3 @@ public:
 
 
 #endif
-
index 53538da1c553dfb5c6e45b8a11ad52e34a7e6620..4ab006aeaeb5104dc4d2d3f84195ee8b392791e3 100644 (file)
@@ -54,10 +54,10 @@ private:
        HANDLE m_hSemaphore;
 #elif __MACH__
        semaphore_t m_semaphore;
+       int semcount;
 #else
        sem_t m_semaphore;
 #endif
-    int semcount;
 };
 
 
index 1caa918b85448d948f9116c133cc6348465ad7df..8a9d14d0aff6296953223bc3a481dbe5c37594f6 100644 (file)
@@ -381,8 +381,6 @@ public:
 #endif
 
 private:
-       IrrlichtDevice *m_device;
-
        // The current state of keys
        KeyList keyIsDown;
        // Whether a key has been pressed or not
index ef15f29ba303dfb41dca6b7aeb4519ff832f5a8c..0ac54ec0810aab3900c052046910bc474e8ff2d0 100644 (file)
@@ -211,8 +211,7 @@ public:
 class MainShaderConstantSetter : public IShaderConstantSetter
 {
 public:
-       MainShaderConstantSetter(IrrlichtDevice *device):
-               m_device(device)
+       MainShaderConstantSetter(IrrlichtDevice *device)
        {}
        ~MainShaderConstantSetter() {}
 
@@ -256,9 +255,6 @@ public:
                        services->setVertexShaderConstant(world.pointer(), 8, 4);
 
        }
-
-private:
-       IrrlichtDevice *m_device;
 };
 
 /*