aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-08-23 20:44:42 +0100
committerYann Herklotz <ymherklotz@gmail.com>2017-08-23 20:44:42 +0100
commitbc982b84ec3e1085c440e4d5ea1de597aee63565 (patch)
tree177bb05838af66dbefc240573687d6e28509e7fc /include
parente912ca9603c5407eb2732f3620d07cf2ca60c80e (diff)
downloadYAGE-bc982b84ec3e1085c440e4d5ea1de597aee63565.tar.gz
YAGE-bc982b84ec3e1085c440e4d5ea1de597aee63565.zip
Applied more fixes on headers.
Passed all headers through clang-tidy and modernize rules.
Diffstat (limited to 'include')
-rw-r--r--include/YAGE/Math/matrix.hpp4
-rw-r--r--include/YAGE/Physics/particlebody.hpp4
-rw-r--r--include/YAGE/Physics/rectanglecollider.hpp4
-rw-r--r--include/YAGE/vertex.hpp8
4 files changed, 10 insertions, 10 deletions
diff --git a/include/YAGE/Math/matrix.hpp b/include/YAGE/Math/matrix.hpp
index 52536c17..999d4274 100644
--- a/include/YAGE/Math/matrix.hpp
+++ b/include/YAGE/Math/matrix.hpp
@@ -273,7 +273,7 @@ public:
const Type& operator[](int col) const { return this->data_[col]; }
- virtual std::string toString() const {
+ std::string toString() const override override override {
std::stringstream ss;
ss << "[";
for (std::size_t i = 0; i < this->data_.size() - 1; ++i) {
@@ -311,7 +311,7 @@ public:
};
/// Definition of a 2D vector.
-typedef Vector2<double> Vector2d;
+using Vector2d = Vector2<double>;
/** Namespace containing functions that operate on matrices. */
namespace matrix {
diff --git a/include/YAGE/Physics/particlebody.hpp b/include/YAGE/Physics/particlebody.hpp
index ff8b3b85..7894e301 100644
--- a/include/YAGE/Physics/particlebody.hpp
+++ b/include/YAGE/Physics/particlebody.hpp
@@ -22,8 +22,8 @@ public:
bool gravity = true);
// apply a force to the rigid body
- virtual void applyForce(const Vector2d& force);
- virtual void update();
+ void applyForce(const Vector2d& force) override override;
+ void update() override override;
};
} // yage
diff --git a/include/YAGE/Physics/rectanglecollider.hpp b/include/YAGE/Physics/rectanglecollider.hpp
index 7f9dd7f7..b66664a0 100644
--- a/include/YAGE/Physics/rectanglecollider.hpp
+++ b/include/YAGE/Physics/rectanglecollider.hpp
@@ -19,8 +19,8 @@ class RectangleCollider : public Collider {
public:
RectangleCollider(const glm::vec2& position, const glm::vec2& size);
- virtual bool collides(const Collider& collider) const;
- virtual bool inside(const glm::vec2& point) const;
+ bool collides(const Collider& collider) const override;
+ bool inside(const glm::vec2& point) const override;
};
} // yage
diff --git a/include/YAGE/vertex.hpp b/include/YAGE/vertex.hpp
index d3355b11..1026253e 100644
--- a/include/YAGE/vertex.hpp
+++ b/include/YAGE/vertex.hpp
@@ -17,7 +17,7 @@ struct Position {
float x;
float y;
- Position() {}
+ Position() = default;
Position(float x_, float y_) : x(x_), y(y_) {}
};
@@ -28,7 +28,7 @@ struct Color {
GLubyte b;
GLubyte a;
- Color() {}
+ Color() = default;
Color(GLubyte r_, GLubyte g_, GLubyte b_, GLubyte a_)
: r(r_), g(g_), b(b_), a(a_) {}
@@ -38,7 +38,7 @@ struct UV {
float u;
float v;
- UV() {}
+ UV() = default;
UV(float u_, float v_) : u(u_), v(v_) {}
};
@@ -48,7 +48,7 @@ struct Vertex {
Color color;
UV uv;
- Vertex() {}
+ Vertex() = default;
Vertex(const Position& position_, const Color& color_, const UV& uv_)
: position(position_), color(color_), uv(uv_) {}