Skip to content

Commit 96762af

Browse files
ClobberXDSmallJoker
authored andcommittedAug 31, 2019
clientobject.h: Fix code-style
1 parent 9543b84 commit 96762af

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed
 

‎src/client/clientobject.h

+16-17
Original file line numberDiff line numberDiff line change
@@ -39,54 +39,53 @@ class ClientActiveObject : public ActiveObject
3939
ClientActiveObject(u16 id, Client *client, ClientEnvironment *env);
4040
virtual ~ClientActiveObject();
4141

42-
virtual void addToScene(ITextureSource *tsrc) {};
42+
virtual void addToScene(ITextureSource *tsrc) {}
4343
virtual void removeFromScene(bool permanent) {}
4444
// 0 <= light_at_pos <= LIGHT_SUN
45-
virtual void updateLight(u8 light_at_pos){}
46-
virtual void updateLightNoCheck(u8 light_at_pos){}
47-
virtual v3s16 getLightPosition(){return v3s16(0,0,0);}
45+
virtual void updateLight(u8 light_at_pos) {}
46+
virtual void updateLightNoCheck(u8 light_at_pos) {}
47+
virtual v3s16 getLightPosition() { return v3s16(0, 0, 0); }
4848
virtual bool getCollisionBox(aabb3f *toset) const { return false; }
4949
virtual bool getSelectionBox(aabb3f *toset) const { return false; }
5050
virtual bool collideWithObjects() const { return false; }
5151
virtual const v3f getPosition() const { return v3f(0.0f); }
5252
virtual scene::ISceneNode *getSceneNode() { return NULL; }
5353
virtual scene::IAnimatedMeshSceneNode *getAnimatedMeshSceneNode() { return NULL; }
54-
virtual bool isLocalPlayer() const {return false;}
54+
virtual bool isLocalPlayer() const { return false; }
5555

5656
virtual ClientActiveObject *getParent() const { return nullptr; };
5757
virtual const std::unordered_set<int> &getAttachmentChildIds() const
5858
{ static std::unordered_set<int> rv; return rv; }
5959
virtual void updateAttachments() {};
6060

61-
virtual bool doShowSelectionBox(){return true;}
61+
virtual bool doShowSelectionBox() { return true; }
6262

6363
// Step object in time
64-
virtual void step(float dtime, ClientEnvironment *env){}
64+
virtual void step(float dtime, ClientEnvironment *env) {}
6565

6666
// Process a message sent by the server side object
67-
virtual void processMessage(const std::string &data){}
67+
virtual void processMessage(const std::string &data) {}
6868

69-
virtual std::string infoText() {return "";}
70-
virtual std::string debugInfoText() {return "";}
69+
virtual std::string infoText() { return ""; }
70+
virtual std::string debugInfoText() { return ""; }
7171

7272
/*
7373
This takes the return value of
7474
ServerActiveObject::getClientInitializationData
7575
*/
76-
virtual void initialize(const std::string &data){}
76+
virtual void initialize(const std::string &data) {}
7777

7878
// Create a certain type of ClientActiveObject
79-
static ClientActiveObject* create(ActiveObjectType type, Client *client,
80-
ClientEnvironment *env);
79+
static ClientActiveObject *create(ActiveObjectType type, Client *client,
80+
ClientEnvironment *env);
8181

8282
// If returns true, punch will not be sent to the server
83-
virtual bool directReportPunch(v3f dir, const ItemStack *punchitem=NULL,
84-
float time_from_last_punch=1000000)
85-
{ return false; }
83+
virtual bool directReportPunch(v3f dir, const ItemStack *punchitem = nullptr,
84+
float time_from_last_punch = 1000000) { return false; }
8685

8786
protected:
8887
// Used for creating objects based on type
89-
typedef ClientActiveObject* (*Factory)(Client *client, ClientEnvironment *env);
88+
typedef ClientActiveObject *(*Factory)(Client *client, ClientEnvironment *env);
9089
static void registerType(u16 type, Factory f);
9190
Client *m_client;
9291
ClientEnvironment *m_env;

0 commit comments

Comments
 (0)