Skip to content

Commit 1d46653

Browse files
penggrin12RobLoach
authored andcommitted
Fix cpplint errors
1 parent 5bae232 commit 1d46653

54 files changed

Lines changed: 546 additions & 482 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎include/AudioDevice.hpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace raylib {
1010
* Audio device management functions.
1111
*/
1212
class AudioDevice {
13-
public:
13+
public:
1414
/**
1515
* Initialize audio device and context.
1616
*
@@ -64,8 +64,8 @@ class AudioDevice {
6464
return *this;
6565
}
6666
};
67-
} // namespace raylib
67+
} // namespace raylib
6868

6969
using RAudioDevice = raylib::AudioDevice;
7070

71-
#endif // RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_
71+
#endif // RAYLIB_CPP_INCLUDE_AUDIODEVICE_HPP_

‎include/AudioStream.hpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace raylib {
1212
* @see raylib::AudioStreamUnmanaged
1313
*/
1414
class AudioStream : public AudioStreamUnmanaged {
15-
public:
15+
public:
1616
using AudioStreamUnmanaged::AudioStreamUnmanaged;
1717

1818
AudioStream(const AudioStream&) = delete;
@@ -48,8 +48,8 @@ class AudioStream : public AudioStreamUnmanaged {
4848
AudioStreamUnmanaged::Load(sampleRate, sampleSize, channels);
4949
}
5050
};
51-
} // namespace raylib
51+
} // namespace raylib
5252

5353
using RAudioStream = raylib::AudioStream;
5454

55-
#endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_
55+
#endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAM_HPP_

‎include/AudioStreamUnmanaged.hpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace raylib {
1414
* @see raylib::AudioStream
1515
*/
1616
class AudioStreamUnmanaged : public ::AudioStream {
17-
public:
17+
public:
1818
/**
1919
* Creates an AudioStreamUnmanaged from an existing AudioStream struct.
2020
*/
@@ -184,7 +184,7 @@ class AudioStreamUnmanaged : public ::AudioStream {
184184
*/
185185
RLCPP_NODISCARD bool IsValid() const { return ::IsAudioStreamValid(*this); }
186186

187-
protected:
187+
protected:
188188
void set(const ::AudioStream& stream) {
189189
buffer = stream.buffer;
190190
processor = stream.processor;
@@ -193,8 +193,8 @@ class AudioStreamUnmanaged : public ::AudioStream {
193193
channels = stream.channels;
194194
}
195195
};
196-
} // namespace raylib
196+
} // namespace raylib
197197

198198
using RAudioStreamUnmanaged = raylib::AudioStreamUnmanaged;
199199

200-
#endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAMUNMANAGED_HPP_
200+
#endif // RAYLIB_CPP_INCLUDE_AUDIOSTREAMUNMANAGED_HPP_

‎include/AutomationEventList.hpp‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace raylib {
1010
* AutomationEventList management functions
1111
*/
1212
class AutomationEventList : public ::AutomationEventList {
13-
public:
13+
public:
1414
AutomationEventList(const ::AutomationEventList& automationEventList)
1515
: ::AutomationEventList(automationEventList) {
1616
// Nothing.
@@ -128,15 +128,16 @@ class AutomationEventList : public ::AutomationEventList {
128128
Set();
129129
::PlayAutomationEvent(this->events[index]);
130130
}
131-
protected:
131+
132+
protected:
132133
void set(const ::AutomationEventList& other) {
133134
capacity = other.capacity;
134135
count = other.count;
135136
events = other.events;
136137
}
137138
};
138-
} // namespace raylib
139+
} // namespace raylib
139140

140141
using RAutomationEventList = raylib::AutomationEventList;
141142

142-
#endif // RAYLIB_CPP_INCLUDE_AUTOMATIONEVENTLIST_HPP_
143+
#endif // RAYLIB_CPP_INCLUDE_AUTOMATIONEVENTLIST_HPP_

‎include/BoundingBox.hpp‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
22
#define RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
33

4+
#include <string>
5+
46
#include "./raylib-cpp-utils.hpp"
57
#include "./raylib.hpp"
68

@@ -11,7 +13,7 @@ namespace raylib {
1113
* Bounding box type
1214
*/
1315
class BoundingBox : public ::BoundingBox {
14-
public:
16+
public:
1517
/*
1618
* Copy a bounding box from another bounding box.
1719
*/
@@ -40,10 +42,8 @@ class BoundingBox : public ::BoundingBox {
4042
}
4143

4244
[[nodiscard]] std::string ToString() const {
43-
return ::TextFormat(
44-
"BoundingBox(min=(%f, %f, %f), max=(%f, %f, %f))",
45-
min.x, min.y, min.z, max.x, max.y, max.z
46-
);
45+
return ::TextFormat("BoundingBox(min=(%f, %f, %f), max=(%f, %f, %f))",
46+
min.x, min.y, min.z, max.x, max.y, max.z);
4747
}
4848

4949
operator std::string() const { return ToString(); }
@@ -61,7 +61,9 @@ class BoundingBox : public ::BoundingBox {
6161
/**
6262
* Detect collision between box and sphere
6363
*/
64-
RLCPP_NODISCARD bool CheckCollision(::Vector3 center, float radius) const { return CheckCollisionBoxSphere(*this, center, radius); }
64+
RLCPP_NODISCARD bool CheckCollision(::Vector3 center, float radius) const {
65+
return CheckCollisionBoxSphere(*this, center, radius);
66+
}
6567

6668
/**
6769
* Detect collision between ray and bounding box
@@ -72,7 +74,8 @@ class BoundingBox : public ::BoundingBox {
7274
* Get collision information between ray and bounding box
7375
*/
7476
RayCollision GetCollision(const ::Ray& ray) const { return GetRayCollisionBox(ray, *this); }
75-
protected:
77+
78+
protected:
7679
void set(const ::BoundingBox& box) {
7780
min = box.min;
7881
max = box.max;
@@ -82,8 +85,8 @@ class BoundingBox : public ::BoundingBox {
8285
max = _max;
8386
}
8487
};
85-
} // namespace raylib
88+
} // namespace raylib
8689

8790
using RBoundingBox = raylib::BoundingBox;
8891

89-
#endif // RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_
92+
#endif // RAYLIB_CPP_INCLUDE_BOUNDINGBOX_HPP_

‎include/Camera2D.hpp‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
#include "./Vector2.hpp"
55
#include "./raylib-cpp-utils.hpp"
66
#include "./raylib.hpp"
7-
#include <raylib.h>
87

98
namespace raylib {
109
/**
1110
* Camera2D type, defines a 2d camera
1211
*/
1312
class Camera2D : public ::Camera2D {
14-
public:
13+
public:
1514
Camera2D(const ::Camera2D& camera)
1615
: ::Camera2D(camera) {
1716
// Nothing.
@@ -54,16 +53,17 @@ class Camera2D : public ::Camera2D {
5453
* Returns the screen space position for a 2d world space position
5554
*/
5655
RLCPP_NODISCARD Vector2 GetWorldToScreen(::Vector2 position) const { return ::GetWorldToScreen2D(position, *this); }
57-
protected:
56+
57+
protected:
5858
void set(const ::Camera2D& camera) {
5959
offset = camera.offset;
6060
target = camera.target;
6161
rotation = camera.rotation;
6262
zoom = camera.zoom;
6363
}
6464
};
65-
} // namespace raylib
65+
} // namespace raylib
6666

6767
using RCamera2D = raylib::Camera2D;
6868

69-
#endif // RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_
69+
#endif // RAYLIB_CPP_INCLUDE_CAMERA2D_HPP_

‎include/Camera3D.hpp‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
22
#define RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
33

4+
#include <string>
5+
46
#include "./Vector3.hpp"
57
#include "./raylib-cpp-utils.hpp"
68
#include "./raylib.hpp"
@@ -10,7 +12,7 @@ namespace raylib {
1012
* Camera type, defines a camera position/orientation in 3d space
1113
*/
1214
class Camera3D : public ::Camera3D {
13-
public:
15+
public:
1416
Camera3D(const ::Camera3D& camera) : ::Camera3D(camera) { }
1517

1618
/**
@@ -46,9 +48,7 @@ class Camera3D : public ::Camera3D {
4648
return ::TextFormat(
4749
"Camera3D(position=(%f, %f, %f), target=(%f, %f, %f), fovy=%f)",
4850
position.x, position.y, position.z,
49-
target.x, target.y, target.z,
50-
fovy
51-
);
51+
target.x, target.y, target.z, fovy);
5252
}
5353

5454
operator std::string() const { return ToString(); }
@@ -126,7 +126,8 @@ class Camera3D : public ::Camera3D {
126126
::Color tint = {255, 255, 255, 255}) const {
127127
::DrawBillboardRec(*this, texture, sourceRec, center, size, tint);
128128
}
129-
protected:
129+
130+
protected:
130131
void set(const ::Camera3D& camera) {
131132
position = camera.position;
132133
target = camera.target;
@@ -138,9 +139,9 @@ class Camera3D : public ::Camera3D {
138139

139140
using Camera = Camera3D;
140141

141-
} // namespace raylib
142+
} // namespace raylib
142143

143144
using RCamera = raylib::Camera;
144145
using RCamera3D = raylib::Camera3D;
145146

146-
#endif // RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_
147+
#endif // RAYLIB_CPP_INCLUDE_CAMERA3D_HPP_

‎include/Color.hpp‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace raylib {
1212
* Color type, RGBA (32bit)
1313
*/
1414
class Color : public ::Color {
15-
public:
15+
public:
1616
constexpr Color(const ::Color& color) : ::Color{color.r, color.g, color.b, color.a} {}
1717

1818
constexpr Color(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha = 255)
@@ -243,7 +243,8 @@ class Color : public ::Color {
243243
static Color Blank() { return BLANK; }
244244
static Color Magenta() { return MAGENTA; }
245245
static Color RayWhite() { return RAYWHITE; }
246-
protected:
246+
247+
protected:
247248
void set(const ::Color& color) {
248249
r = color.r;
249250
g = color.g;
@@ -252,8 +253,8 @@ class Color : public ::Color {
252253
}
253254
};
254255

255-
} // namespace raylib
256+
} // namespace raylib
256257

257258
using RColor = raylib::Color;
258259

259-
#endif // RAYLIB_CPP_INCLUDE_COLOR_HPP_
260+
#endif // RAYLIB_CPP_INCLUDE_COLOR_HPP_

‎include/FileData.hpp‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace raylib {
1111

1212
class FileData {
13-
public:
13+
public:
1414
FileData() = default;
1515
FileData(const FileData&) = delete;
1616
FileData(FileData&& other) noexcept : data(other.data), bytesRead(other.bytesRead) {
@@ -43,13 +43,14 @@ class FileData {
4343
bytesRead = 0;
4444
}
4545
}
46-
private:
46+
47+
private:
4748
unsigned char* data{nullptr};
4849
int bytesRead{0};
4950
};
5051

51-
} // namespace raylib
52+
} // namespace raylib
5253

5354
using RFileData = raylib::FileData;
5455

55-
#endif // RAYLIB_CPP_INCLUDE_FILEDATA_HPP_
56+
#endif // RAYLIB_CPP_INCLUDE_FILEDATA_HPP_

‎include/FileText.hpp‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace raylib {
1111

1212
class FileText {
13-
public:
13+
public:
1414
FileText() = default;
1515
FileText(const FileText&) = delete;
1616
FileText(FileText&& other) noexcept : data(other.data), length(other.length) {
@@ -48,13 +48,14 @@ class FileText {
4848
length = 0;
4949
}
5050
}
51-
private:
51+
52+
private:
5253
char* data{nullptr};
5354
unsigned int length{0};
5455
};
5556

56-
} // namespace raylib
57+
} // namespace raylib
5758

5859
using RFileText = raylib::FileText;
5960

60-
#endif // RAYLIB_CPP_INCLUDE_FILETEXT_HPP_
61+
#endif // RAYLIB_CPP_INCLUDE_FILETEXT_HPP_

0 commit comments

Comments
 (0)