Skip to content

Commit 378dbfd

Browse files
Adjusted the '.clang-format' file to avoid warnings from cpplint
1 parent 0512882 commit 378dbfd

4 files changed

Lines changed: 18 additions & 15 deletions

File tree

‎.clang-format‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
Language: Cpp
33
BasedOnStyle: Google
4-
AccessModifierOffset: -4
4+
AccessModifierOffset: -3
55
AlignAfterOpenBracket: AlwaysBreak
66
AlignConsecutiveAssignments: false
77
AlignConsecutiveDeclarations: false
@@ -60,7 +60,7 @@ Cpp11BracedListStyle: true
6060
DeriveLineEnding: true
6161
DerivePointerAlignment: false
6262
DisableFormat: false
63-
EmptyLineBeforeAccessModifier: Never
63+
EmptyLineBeforeAccessModifier: Always
6464
EmptyLineAfterAccessModifier: Never
6565
ExperimentalAutoDetectBinPacking: false
6666
IndentCaseLabels: true
@@ -111,7 +111,7 @@ SpaceBeforeParensOptions:
111111
AfterIfMacros: false
112112
SpaceBeforeRangeBasedForLoopColon: true
113113
SpaceInEmptyParentheses: false
114-
SpacesBeforeTrailingComments: 1
114+
SpacesBeforeTrailingComments: 2
115115
SpacesInAngles: false
116116
SpacesInContainerLiterals: false
117117
SpacesInCStyleCastParentheses: false

‎include/Vector2.hpp‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace raylib {
1313
* Vector2 type
1414
*/
1515
class Vector2 : public ::Vector2 {
16-
public:
16+
public:
1717
constexpr Vector2(const ::Vector2& vec) : ::Vector2{vec.x, vec.y} {}
1818

1919
constexpr Vector2(float x = 0, float y = 0) : ::Vector2{x, y} {}
@@ -373,15 +373,16 @@ class Vector2 : public ::Vector2 {
373373
RLCPP_NODISCARD bool CheckCollisionPointLine(::Vector2 p1, ::Vector2 p2, int threshold = 1) const {
374374
return ::CheckCollisionPointLine(*this, p1, p2, threshold);
375375
}
376-
protected:
376+
377+
protected:
377378
void set(const ::Vector2& vec) {
378379
x = vec.x;
379380
y = vec.y;
380381
}
381382
};
382383

383-
} // namespace raylib
384+
} // namespace raylib
384385

385386
using RVector2 = raylib::Vector2;
386387

387-
#endif // RAYLIB_CPP_INCLUDE_VECTOR2_HPP_
388+
#endif // RAYLIB_CPP_INCLUDE_VECTOR2_HPP_

‎include/Vector3.hpp‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace raylib {
1212
* Vector3 type
1313
*/
1414
class Vector3 : public ::Vector3 {
15-
public:
15+
public:
1616
constexpr Vector3(const ::Vector3& vec) : ::Vector3{vec.x, vec.y, vec.z} {}
1717

1818
constexpr Vector3(float x = 0, float y = 0, float z = 0) : ::Vector3{x, y, z} {}
@@ -288,15 +288,16 @@ class Vector3 : public ::Vector3 {
288288
RLCPP_NODISCARD bool CheckCollision(float radius1, const ::Vector3& center2, float radius2) const {
289289
return CheckCollisionSpheres(*this, radius1, center2, radius2);
290290
}
291-
protected:
291+
292+
protected:
292293
void set(const ::Vector3& vec) {
293294
x = vec.x;
294295
y = vec.y;
295296
z = vec.z;
296297
}
297298
};
298-
} // namespace raylib
299+
} // namespace raylib
299300

300301
using RVector3 = raylib::Vector3;
301302

302-
#endif // RAYLIB_CPP_INCLUDE_VECTOR3_HPP_
303+
#endif // RAYLIB_CPP_INCLUDE_VECTOR3_HPP_

‎include/Vector4.hpp‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Quaternion : public ::Quaternion {};
1515
* Vector4 type
1616
*/
1717
class Vector4 : public ::Vector4 {
18-
public:
18+
public:
1919
constexpr Vector4(const ::Vector4& vec) : ::Vector4{vec.x, vec.y, vec.z, vec.w} {}
2020
explicit constexpr Vector4(const raylib::Quaternion quat) : ::Vector4{quat.x, quat.y, quat.z, quat.w} {}
2121

@@ -290,7 +290,8 @@ class Vector4 : public ::Vector4 {
290290
RLCPP_NODISCARD Color ColorFromNormalized() const { return ::ColorFromNormalized(*this); }
291291

292292
operator Color() const { return ColorFromNormalized(); }
293-
protected:
293+
294+
protected:
294295
void set(const ::Vector4& vec4) {
295296
x = vec4.x;
296297
y = vec4.y;
@@ -299,8 +300,8 @@ class Vector4 : public ::Vector4 {
299300
}
300301
};
301302

302-
} // namespace raylib
303+
} // namespace raylib
303304

304305
using RVector4 = raylib::Vector4;
305306

306-
#endif // RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
307+
#endif // RAYLIB_CPP_INCLUDE_VECTOR4_HPP_

0 commit comments

Comments
 (0)