Skip to content

Commit 37b7f09

Browse files
committedJul 6, 2014
Fix warnings reported by clang
1 parent 5f9962e commit 37b7f09

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed
 

‎src/clientobject.h

+6-7
Original file line numberDiff line numberDiff line change
@@ -61,27 +61,27 @@ class ClientActiveObject : public ActiveObject
6161
virtual scene::IMeshSceneNode *getMeshSceneNode(){return NULL;}
6262
virtual scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode(){return NULL;}
6363
virtual scene::IBillboardSceneNode *getSpriteSceneNode(){return NULL;}
64-
virtual bool isPlayer(){return false;}
65-
virtual bool isLocalPlayer(){return false;}
64+
virtual bool isPlayer() const {return false;}
65+
virtual bool isLocalPlayer() const {return false;}
6666
virtual void setAttachments(){}
6767
virtual bool doShowSelectionBox(){return true;}
6868
virtual void updateCameraOffset(v3s16 camera_offset){};
69-
69+
7070
// Step object in time
7171
virtual void step(float dtime, ClientEnvironment *env){}
72-
72+
7373
// Process a message sent by the server side object
7474
virtual void processMessage(const std::string &data){}
7575

7676
virtual std::string infoText() {return "";}
7777
virtual std::string debugInfoText() {return "";}
78-
78+
7979
/*
8080
This takes the return value of
8181
ServerActiveObject::getClientInitializationData
8282
*/
8383
virtual void initialize(const std::string &data){}
84-
84+
8585
// Create a certain type of ClientActiveObject
8686
static ClientActiveObject* create(u8 type, IGameDef *gamedef,
8787
ClientEnvironment *env);
@@ -120,4 +120,3 @@ struct DistanceSortedActiveObject
120120
};
121121

122122
#endif
123-

‎src/content_cao.h

-1
Original file line numberDiff line numberDiff line change
@@ -197,4 +197,3 @@ class GenericCAO : public ClientActiveObject
197197

198198

199199
#endif
200-

‎src/jthread/jsemaphore.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ class JSemaphore {
5454
HANDLE m_hSemaphore;
5555
#elif __MACH__
5656
semaphore_t m_semaphore;
57+
int semcount;
5758
#else
5859
sem_t m_semaphore;
5960
#endif
60-
int semcount;
6161
};
6262

6363

‎src/main.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,6 @@ class MyEventReceiver : public IEventReceiver
381381
#endif
382382

383383
private:
384-
IrrlichtDevice *m_device;
385-
386384
// The current state of keys
387385
KeyList keyIsDown;
388386
// Whether a key has been pressed or not

‎src/shader.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,7 @@ class ShaderCallback : public video::IShaderConstantSetCallBack
211211
class MainShaderConstantSetter : public IShaderConstantSetter
212212
{
213213
public:
214-
MainShaderConstantSetter(IrrlichtDevice *device):
215-
m_device(device)
214+
MainShaderConstantSetter(IrrlichtDevice *device)
216215
{}
217216
~MainShaderConstantSetter() {}
218217

@@ -256,9 +255,6 @@ class MainShaderConstantSetter : public IShaderConstantSetter
256255
services->setVertexShaderConstant(world.pointer(), 8, 4);
257256

258257
}
259-
260-
private:
261-
IrrlichtDevice *m_device;
262258
};
263259

264260
/*

0 commit comments

Comments
 (0)
Please sign in to comment.