summaryrefslogtreecommitdiffstats
path: root/servers/physics/constraint_sw.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /servers/physics/constraint_sw.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
downloadredot-engine-5dbf1809c6e3e905b94b8764e99491e608122261.tar.gz
A Whole New World (clang-format edition)
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
Diffstat (limited to 'servers/physics/constraint_sw.h')
-rw-r--r--servers/physics/constraint_sw.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/servers/physics/constraint_sw.h b/servers/physics/constraint_sw.h
index f5bbe4bbd0..2cd0e1a420 100644
--- a/servers/physics/constraint_sw.h
+++ b/servers/physics/constraint_sw.h
@@ -40,35 +40,37 @@ class ConstraintSW : public RID_Data {
ConstraintSW *island_list_next;
int priority;
-
RID self;
protected:
- ConstraintSW(BodySW **p_body_ptr=NULL,int p_body_count=0) { _body_ptr=p_body_ptr; _body_count=p_body_count; island_step=0; priority=1; }
-public:
+ ConstraintSW(BodySW **p_body_ptr = NULL, int p_body_count = 0) {
+ _body_ptr = p_body_ptr;
+ _body_count = p_body_count;
+ island_step = 0;
+ priority = 1;
+ }
- _FORCE_INLINE_ void set_self(const RID& p_self) { self=p_self; }
+public:
+ _FORCE_INLINE_ void set_self(const RID &p_self) { self = p_self; }
_FORCE_INLINE_ RID get_self() const { return self; }
_FORCE_INLINE_ uint64_t get_island_step() const { return island_step; }
- _FORCE_INLINE_ void set_island_step(uint64_t p_step) { island_step=p_step; }
+ _FORCE_INLINE_ void set_island_step(uint64_t p_step) { island_step = p_step; }
+ _FORCE_INLINE_ ConstraintSW *get_island_next() const { return island_next; }
+ _FORCE_INLINE_ void set_island_next(ConstraintSW *p_next) { island_next = p_next; }
- _FORCE_INLINE_ ConstraintSW* get_island_next() const { return island_next; }
- _FORCE_INLINE_ void set_island_next(ConstraintSW* p_next) { island_next=p_next; }
-
- _FORCE_INLINE_ ConstraintSW* get_island_list_next() const { return island_list_next; }
- _FORCE_INLINE_ void set_island_list_next(ConstraintSW* p_next) { island_list_next=p_next; }
+ _FORCE_INLINE_ ConstraintSW *get_island_list_next() const { return island_list_next; }
+ _FORCE_INLINE_ void set_island_list_next(ConstraintSW *p_next) { island_list_next = p_next; }
_FORCE_INLINE_ BodySW **get_body_ptr() const { return _body_ptr; }
_FORCE_INLINE_ int get_body_count() const { return _body_count; }
- _FORCE_INLINE_ void set_priority(int p_priority) { priority=p_priority; }
+ _FORCE_INLINE_ void set_priority(int p_priority) { priority = p_priority; }
_FORCE_INLINE_ int get_priority() const { return priority; }
-
- virtual bool setup(real_t p_step)=0;
- virtual void solve(real_t p_step)=0;
+ virtual bool setup(real_t p_step) = 0;
+ virtual void solve(real_t p_step) = 0;
virtual ~ConstraintSW() {}
};