aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2014-07-06 13:07:23 +0200
committersfan5 <sfan5@live.de>2014-07-06 13:19:21 +0200
commit37b7f094e3ea502339794f64e8bad22444c6fb54 (patch)
tree7d0e86cdaf18abaf1f101311645ae6a90a6d5a06
parent5f9962e1cc04a773d162ba9c0dc44407b55c4bf8 (diff)
downloadminetest-37b7f094e3ea502339794f64e8bad22444c6fb54.tar.gz
minetest-37b7f094e3ea502339794f64e8bad22444c6fb54.tar.bz2
minetest-37b7f094e3ea502339794f64e8bad22444c6fb54.zip
Fix warnings reported by clang
-rw-r--r--src/clientobject.h13
-rw-r--r--src/content_cao.h1
-rw-r--r--src/jthread/jsemaphore.h2
-rw-r--r--src/main.cpp2
-rw-r--r--src/shader.cpp6
5 files changed, 8 insertions, 16 deletions
diff --git a/src/clientobject.h b/src/clientobject.h
index 233617b5c..cae551abc 100644
--- a/src/clientobject.h
+++ b/src/clientobject.h
@@ -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
-
diff --git a/src/content_cao.h b/src/content_cao.h
index bf27ed79a..bf1ac5b3f 100644
--- a/src/content_cao.h
+++ b/src/content_cao.h
@@ -197,4 +197,3 @@ public:
#endif
-
diff --git a/src/jthread/jsemaphore.h b/src/jthread/jsemaphore.h
index 53538da1c..4ab006aea 100644
--- a/src/jthread/jsemaphore.h
+++ b/src/jthread/jsemaphore.h
@@ -54,10 +54,10 @@ private:
HANDLE m_hSemaphore;
#elif __MACH__
semaphore_t m_semaphore;
+ int semcount;
#else
sem_t m_semaphore;
#endif
- int semcount;
};
diff --git a/src/main.cpp b/src/main.cpp
index 1caa918b8..8a9d14d0a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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
diff --git a/src/shader.cpp b/src/shader.cpp
index ef15f29ba..0ac54ec08 100644
--- a/src/shader.cpp
+++ b/src/shader.cpp
@@ -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;
};
/*