From f9cc383fc697a884413bda65d75e0e13dfcf3cbb Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 24 Aug 2017 01:27:57 +0100 Subject: Fixing namespace. --- include/YAGE/Math/matrix.hpp | 6 +++--- include/YAGE/Physics/particlebody.hpp | 2 +- include/YAGE/Physics/rectanglecollider.hpp | 2 +- include/YAGE/Physics/rigidbody.hpp | 2 +- include/YAGE/camera2d.hpp | 2 +- include/YAGE/glslprogram.hpp | 2 +- include/YAGE/imageloader.hpp | 2 +- include/YAGE/inputmanager.hpp | 2 +- include/YAGE/iomanager.hpp | 2 +- include/YAGE/picopng.hpp | 2 +- include/YAGE/resourcemanager.hpp | 2 +- include/YAGE/sprite.hpp | 2 +- include/YAGE/texture.hpp | 2 +- include/YAGE/texturecache.hpp | 2 +- include/YAGE/vertex.hpp | 2 +- include/YAGE/yage.hpp | 3 ++- src/body.cpp | 2 +- src/camera2d.cpp | 2 +- src/glslprogram.cpp | 2 +- src/imageloader.cpp | 2 +- src/inputmanager.cpp | 2 +- src/iomanager.cpp | 2 +- src/particlebody.cpp | 2 +- src/picopng.cpp | 2 +- src/rectanglecollider.cpp | 2 +- src/resourcemanager.cpp | 2 +- src/rigidbody.cpp | 2 +- src/sprite.cpp | 2 +- src/spritebatch.cpp | 2 +- src/texturecache.cpp | 2 +- src/window.cpp | 2 +- 31 files changed, 34 insertions(+), 33 deletions(-) diff --git a/include/YAGE/Math/matrix.hpp b/include/YAGE/Math/matrix.hpp index e2dd1944..5d29a788 100644 --- a/include/YAGE/Math/matrix.hpp +++ b/include/YAGE/Math/matrix.hpp @@ -77,7 +77,7 @@ public: } }; -} // detail +} // namespace detail /** Base Matrix class used by other similar classes. * @@ -412,8 +412,8 @@ Matrix multiply(const Matrix &m1, const Matrix &m2) return res; } -} // matrix +} // namespace matrix -} // yage +} // namespace yage #endif diff --git a/include/YAGE/Physics/particlebody.hpp b/include/YAGE/Physics/particlebody.hpp index a3091773..15f1ae5a 100644 --- a/include/YAGE/Physics/particlebody.hpp +++ b/include/YAGE/Physics/particlebody.hpp @@ -27,6 +27,6 @@ public: void update() override; }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/Physics/rectanglecollider.hpp b/include/YAGE/Physics/rectanglecollider.hpp index ba1d8384..f6f6c481 100644 --- a/include/YAGE/Physics/rectanglecollider.hpp +++ b/include/YAGE/Physics/rectanglecollider.hpp @@ -25,6 +25,6 @@ public: bool inside(const glm::vec2 &point) const override; }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/Physics/rigidbody.hpp b/include/YAGE/Physics/rigidbody.hpp index 6fc969f5..48ca6761 100644 --- a/include/YAGE/Physics/rigidbody.hpp +++ b/include/YAGE/Physics/rigidbody.hpp @@ -23,6 +23,6 @@ public: const Vector2d &velocity = Vector2d(0, 0), bool gravity = true); }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/camera2d.hpp b/include/YAGE/camera2d.hpp index 89f2f35c..354b3a17 100644 --- a/include/YAGE/camera2d.hpp +++ b/include/YAGE/camera2d.hpp @@ -35,6 +35,6 @@ public: void move(const glm::vec2 &direction); }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/glslprogram.hpp b/include/YAGE/glslprogram.hpp index eaa19c52..154e2e57 100644 --- a/include/YAGE/glslprogram.hpp +++ b/include/YAGE/glslprogram.hpp @@ -47,6 +47,6 @@ public: void unuse(); }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/imageloader.hpp b/include/YAGE/imageloader.hpp index a9c00c4b..770307d1 100644 --- a/include/YAGE/imageloader.hpp +++ b/include/YAGE/imageloader.hpp @@ -22,6 +22,6 @@ public: static Texture loadPng(const std::string &file_path); }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/inputmanager.hpp b/include/YAGE/inputmanager.hpp index 0d5c65e7..61c5ce53 100644 --- a/include/YAGE/inputmanager.hpp +++ b/include/YAGE/inputmanager.hpp @@ -24,5 +24,5 @@ public: void keyReleased(unsigned key); bool isKeyPressed(unsigned key) const; }; -} +} // namespace yage #endif diff --git a/include/YAGE/iomanager.hpp b/include/YAGE/iomanager.hpp index 35f77e43..4f30e51c 100644 --- a/include/YAGE/iomanager.hpp +++ b/include/YAGE/iomanager.hpp @@ -22,6 +22,6 @@ public: std::vector &buffer); }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/picopng.hpp b/include/YAGE/picopng.hpp index ded8ffa1..c0a42c28 100644 --- a/include/YAGE/picopng.hpp +++ b/include/YAGE/picopng.hpp @@ -17,4 +17,4 @@ extern int decodePNG(std::vector &out_image, const unsigned char *in_png, size_t in_size, bool convert_to_rgba32 = true); -} // yage +} // namespace yage diff --git a/include/YAGE/resourcemanager.hpp b/include/YAGE/resourcemanager.hpp index 38587dfc..ebd30476 100644 --- a/include/YAGE/resourcemanager.hpp +++ b/include/YAGE/resourcemanager.hpp @@ -26,6 +26,6 @@ public: static Texture getTexture(const std::string &texture_path); }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/sprite.hpp b/include/YAGE/sprite.hpp index 4b5f2489..28e13437 100644 --- a/include/YAGE/sprite.hpp +++ b/include/YAGE/sprite.hpp @@ -42,6 +42,6 @@ public: void draw(); }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/texture.hpp b/include/YAGE/texture.hpp index b5fe7acd..d2cc3bdd 100644 --- a/include/YAGE/texture.hpp +++ b/include/YAGE/texture.hpp @@ -20,6 +20,6 @@ struct Texture { int height; }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/texturecache.hpp b/include/YAGE/texturecache.hpp index 9765b919..1542ad79 100644 --- a/include/YAGE/texturecache.hpp +++ b/include/YAGE/texturecache.hpp @@ -27,6 +27,6 @@ public: Texture getTexture(const std::string &texture_path); }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/vertex.hpp b/include/YAGE/vertex.hpp index 9201393b..ef379888 100644 --- a/include/YAGE/vertex.hpp +++ b/include/YAGE/vertex.hpp @@ -79,6 +79,6 @@ struct Vertex { } }; -} // yage +} // namespace yage #endif diff --git a/include/YAGE/yage.hpp b/include/YAGE/yage.hpp index 50a1f857..f7b32683 100644 --- a/include/YAGE/yage.hpp +++ b/include/YAGE/yage.hpp @@ -36,6 +36,7 @@ void quit() { SDL_Quit(); } -}; + +} // namespace yage #endif diff --git a/src/body.cpp b/src/body.cpp index 036059a3..e38cd641 100644 --- a/src/body.cpp +++ b/src/body.cpp @@ -31,4 +31,4 @@ Body::Body(Vector2d position, double mass, Vector2d velocity, bool gravity) { } -} // yage +} // namespace yage diff --git a/src/camera2d.cpp b/src/camera2d.cpp index 9f210ddc..0ddd454e 100644 --- a/src/camera2d.cpp +++ b/src/camera2d.cpp @@ -42,4 +42,4 @@ void Camera2D::move(const glm::vec2 &direction) matrix_needs_update_ = true; } -} // yage +} // namespace yage diff --git a/src/glslprogram.cpp b/src/glslprogram.cpp index d77f373d..d148ea8b 100644 --- a/src/glslprogram.cpp +++ b/src/glslprogram.cpp @@ -159,4 +159,4 @@ void GlslProgram::unuse() glUseProgram(0); } -} // yage +} // namespace yage diff --git a/src/imageloader.cpp b/src/imageloader.cpp index 95c73021..a833f754 100644 --- a/src/imageloader.cpp +++ b/src/imageloader.cpp @@ -57,4 +57,4 @@ Texture ImageLoader::loadPng(const std::string &file_path) return texture; } -} // yage +} // namespace yage diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp index 1595dba0..4e1abdf2 100644 --- a/src/inputmanager.cpp +++ b/src/inputmanager.cpp @@ -30,4 +30,4 @@ bool InputManager::isKeyPressed(unsigned key) const return false; } -} // yage +} // namespace yage diff --git a/src/iomanager.cpp b/src/iomanager.cpp index 60cd7201..7ecd6795 100644 --- a/src/iomanager.cpp +++ b/src/iomanager.cpp @@ -39,4 +39,4 @@ bool IoManager::readFileToBuffer(const std::string &file_path, return true; } -} // yage +} // namespace yage diff --git a/src/particlebody.cpp b/src/particlebody.cpp index 3eea4183..216f2db9 100644 --- a/src/particlebody.cpp +++ b/src/particlebody.cpp @@ -51,4 +51,4 @@ void ParticleBody::update() velocity_ += avg_acceleration * time_step; } -} // yage +} // namespace yage diff --git a/src/picopng.cpp b/src/picopng.cpp index 337038ba..401fb932 100644 --- a/src/picopng.cpp +++ b/src/picopng.cpp @@ -1115,4 +1115,4 @@ int decodePNG(std::vector &out_image, unsigned long &image_width, return decoder.error; } -} // yage +} // namespace yage diff --git a/src/rectanglecollider.cpp b/src/rectanglecollider.cpp index 936ac06a..71913817 100644 --- a/src/rectanglecollider.cpp +++ b/src/rectanglecollider.cpp @@ -33,4 +33,4 @@ inline bool RectangleCollider::inside(const glm::vec2 &point) const position_.y < point.y && position_.y + size_.y > point.y; } -} // yage +} // namespace yage diff --git a/src/resourcemanager.cpp b/src/resourcemanager.cpp index 8444161f..a7c07207 100644 --- a/src/resourcemanager.cpp +++ b/src/resourcemanager.cpp @@ -18,4 +18,4 @@ Texture ResourceManager::getTexture(const std::string &texture_path) return texture_cache_.getTexture(texture_path); } -} // yage +} // namespace yage diff --git a/src/rigidbody.cpp b/src/rigidbody.cpp index deb8aee9..2b57beaf 100644 --- a/src/rigidbody.cpp +++ b/src/rigidbody.cpp @@ -17,4 +17,4 @@ RigidBody::RigidBody(const Vector2d &position, double mass, { } -} // yage +} // namespace yage diff --git a/src/sprite.cpp b/src/sprite.cpp index 92dd584c..b4584561 100644 --- a/src/sprite.cpp +++ b/src/sprite.cpp @@ -94,4 +94,4 @@ void Sprite::draw() glBindBuffer(GL_ARRAY_BUFFER, 0); } -} // yage +} // namespace yage diff --git a/src/spritebatch.cpp b/src/spritebatch.cpp index 4d4f1b19..8cfc8bc2 100644 --- a/src/spritebatch.cpp +++ b/src/spritebatch.cpp @@ -190,4 +190,4 @@ void SpriteBatch::sortGlyphs() }); } -} // yage +} // namespace yage diff --git a/src/texturecache.cpp b/src/texturecache.cpp index 5ce89dc1..4e6c9bcf 100644 --- a/src/texturecache.cpp +++ b/src/texturecache.cpp @@ -27,4 +27,4 @@ Texture TextureCache::getTexture(const std::string &texture_path) return itr->second; } -} // yage +} // namespace yage diff --git a/src/window.cpp b/src/window.cpp index 6eca459d..e5a6582b 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -95,4 +95,4 @@ void Window::clearBuffer() glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); } -} // yage +} // namespace yage -- cgit