Fix cpplint

This commit is contained in:
Rob Loach
2021-11-15 03:51:09 -05:00
parent ff5190435a
commit 27cd111f03
10 changed files with 19 additions and 22 deletions

View File

@@ -60,7 +60,7 @@ class BoundingBox : public ::BoundingBox {
inline bool CheckCollision(const ::Ray& ray) const {
return GetRayCollisionBox(ray, *this).hit;
}
/**
* Get collision information between ray and bounding box
*/

View File

@@ -17,8 +17,7 @@ class Camera2D : public ::Camera2D {
Camera2D() {}
Camera2D(::Vector2 offset, ::Vector2 target,
float rotation = 0.0f, float zoom = 1.0f
) : ::Camera2D{offset, target, rotation, zoom} {}
float rotation = 0.0f, float zoom = 1.0f) : ::Camera2D{offset, target, rotation, zoom} {}
inline Camera2D& BeginMode() {
::BeginMode2D(*this);

View File

@@ -28,8 +28,7 @@ class Camera3D : public ::Camera3D {
::Vector3 target = ::Vector3{0.0f, 0.0f, 0.0f},
::Vector3 up = ::Vector3{0.0f, 1.0f, 0.0f},
float fovy = 0,
int projection = CAMERA_PERSPECTIVE
) : ::Camera3D{position, target, up, fovy, projection} {}
int projection = CAMERA_PERSPECTIVE) : ::Camera3D{position, target, up, fovy, projection} {}
Camera3D() {}

View File

@@ -21,8 +21,7 @@ class Color : public ::Color {
unsigned char red,
unsigned char green,
unsigned char blue,
unsigned char alpha = 255
) : ::Color{red, green, blue, alpha} {};
unsigned char alpha = 255) : ::Color{red, green, blue, alpha} {};
/**
* Black.

View File

@@ -42,7 +42,7 @@ class Material : public ::Material {
*/
static std::vector<Material> Load(const std::string& fileName) {
int count = 0;
// TODO: Material::Load() possibly leaks the materials array.
// TODO(RobLoach): Material::Load() possibly leaks the materials array.
::Material* materials = ::LoadMaterials(fileName.c_str(), &count);
return std::vector<Material>(materials, materials + count);
}

View File

@@ -22,8 +22,8 @@ class Matrix : public ::Matrix {
Matrix(
float m0 = 0, float m1 = 0, float m2 = 0, float m3 = 0, float m4 = 0, float m5 = 0,
float m6 = 0, float m7 = 0, float m8 = 0, float m9 = 0, float m10 = 0, float m11 = 0,
float m12 = 0, float m13 = 0, float m14 = 0, float m15 = 0
) : ::Matrix{m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15} {}
float m12 = 0, float m13 = 0, float m14 = 0,
float m15 = 0) : ::Matrix{m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15} {}
GETTERSETTER(float, M0, m0)
GETTERSETTER(float, M1, m1)

View File

@@ -43,7 +43,7 @@ class Ray : public ::Ray {
inline bool CheckCollisionSphere(::Vector3 center, float radius) const {
return GetRayCollisionSphere(*this, center, radius).hit;
}
/**
* Get collision information between ray and sphere
*/
@@ -57,7 +57,7 @@ class Ray : public ::Ray {
inline bool CheckCollision(const ::BoundingBox& box) const {
return GetRayCollisionBox(*this, box).hit;
}
/**
* Get collision information between ray and box
*/

View File

@@ -1,5 +1,5 @@
#ifndef RAYLIB_CPP_INCLUDE_RAYHITINFO_HPP_
#define RAYLIB_CPP_INCLUDE_RAYHITINFO_HPP_
#ifndef RAYLIB_CPP_INCLUDE_RAYCOLLISION_HPP_
#define RAYLIB_CPP_INCLUDE_RAYCOLLISION_HPP_
#include "./raylib.hpp"
#include "./raylib-cpp-utils.hpp"
@@ -14,7 +14,8 @@ class RayCollision : public ::RayCollision {
set(ray);
}
RayCollision(bool hit, float distance, ::Vector3 point, ::Vector3 normal) : ::RayCollision{hit, distance, point, normal} {}
RayCollision(bool hit, float distance,
::Vector3 point, ::Vector3 normal) : ::RayCollision{hit, distance, point, normal} {}
/**
* Get collision info between ray and mesh
@@ -57,4 +58,4 @@ class RayCollision : public ::RayCollision {
};
} // namespace raylib
#endif // RAYLIB_CPP_INCLUDE_RAYHITINFO_HPP_
#endif // RAYLIB_CPP_INCLUDE_RAYCOLLISION_HPP_

View File

@@ -25,7 +25,7 @@ class Sound : public ::Sound {
other.frameCount = 0;
other.stream = { 0, 0, 0, 0 };
};
}
Sound(const std::string& fileName) {
set(LoadSound(fileName.c_str()));
@@ -53,7 +53,7 @@ class Sound : public ::Sound {
other.stream = { 0, 0, 0, 0 };
return *this;
};
}
/**
* Update sound buffer with new data

View File

@@ -21,8 +21,7 @@ class Wave : public ::Wave {
unsigned int sampleRate = 0,
unsigned int sampleSize = 0,
unsigned int channels = 0,
void *data = nullptr
) : ::Wave{frameCount, sampleRate, sampleSize, channels, data} { }
void *data = nullptr) : ::Wave{frameCount, sampleRate, sampleSize, channels, data} { }
/**
* Load wave data from file
@@ -40,7 +39,7 @@ class Wave : public ::Wave {
Wave(const Wave& other) {
set(other.Copy());
};
}
Wave(Wave&& other) {
set(other);
@@ -79,7 +78,7 @@ class Wave : public ::Wave {
set(other.Copy());
return *this;
};
}
Wave& operator=(Wave&& other) {
if (this != &other) {