diff options
author | Bastiaan Olij <mux213@gmail.com> | 2018-11-24 09:09:41 +1100 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2018-11-24 09:09:41 +1100 |
commit | fc20fa3fce2f30c96fa2bbf8d460817f91b90e81 (patch) | |
tree | decd51288822651ad34fd270e68a2f2a54d0bd8d /src/core/RID.cpp | |
parent | 0a6f5d052a0d05e07ca1b7eab8e53bbd8450a991 (diff) | |
download | redot-cpp-fc20fa3fce2f30c96fa2bbf8d460817f91b90e81.tar.gz |
Implementing clang-format and applying it to all classes
Diffstat (limited to 'src/core/RID.cpp')
-rw-r--r-- | src/core/RID.cpp | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/src/core/RID.cpp b/src/core/RID.cpp index aaf8e7a..7ca1e7a 100644 --- a/src/core/RID.cpp +++ b/src/core/RID.cpp @@ -6,50 +6,40 @@ namespace godot { -RID::RID() -{ +RID::RID() { godot::api->godot_rid_new(&_godot_rid); } -RID::RID(Object *p) -{ - godot::api->godot_rid_new_with_resource(&_godot_rid, (const godot_object *) p); +RID::RID(Object *p) { + godot::api->godot_rid_new_with_resource(&_godot_rid, (const godot_object *)p); } -int32_t RID::get_rid() const -{ +int32_t RID::get_rid() const { return godot::api->godot_rid_get_id(&_godot_rid); } -bool RID::operator==(const RID & p_other) const -{ +bool RID::operator==(const RID &p_other) const { return godot::api->godot_rid_operator_equal(&_godot_rid, &p_other._godot_rid); } -bool RID::operator!=(const RID & p_other) const -{ +bool RID::operator!=(const RID &p_other) const { return !(*this == p_other); } -bool RID::operator<(const RID & p_other) const -{ +bool RID::operator<(const RID &p_other) const { return godot::api->godot_rid_operator_less(&_godot_rid, &p_other._godot_rid); } -bool RID::operator>(const RID & p_other) const -{ +bool RID::operator>(const RID &p_other) const { return !(*this < p_other) && *this != p_other; } -bool RID::operator<=(const RID & p_other) const -{ +bool RID::operator<=(const RID &p_other) const { return (*this < p_other) || *this == p_other; } -bool RID::operator>=(const RID & p_other) const -{ +bool RID::operator>=(const RID &p_other) const { return !(*this < p_other); } - -} +} // namespace godot |