From fd94bd41d3dd3150522a85e93622cb709997bfaf Mon Sep 17 00:00:00 2001 From: "arthur.jamet" Date: Tue, 1 Jun 2021 11:41:09 +0200 Subject: [PATCH] fix typos and mispalced spaces --- lib/Ray/sources/Drawables/2D/Rectangle.hpp | 2 +- lib/Ray/sources/Drawables/Image.cpp | 6 +++--- lib/Ray/sources/Drawables/Image.hpp | 2 +- lib/Ray/sources/Model/Model.hpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Ray/sources/Drawables/2D/Rectangle.hpp b/lib/Ray/sources/Drawables/2D/Rectangle.hpp index fc1e08ff..e0d32dff 100644 --- a/lib/Ray/sources/Drawables/2D/Rectangle.hpp +++ b/lib/Ray/sources/Drawables/2D/Rectangle.hpp @@ -37,7 +37,7 @@ namespace RAY::Drawables::Drawables2D { Rectangle &operator=(const Rectangle &) = default; //! @brief A default destructor - ~Rectangle() override = default; + virtual ~Rectangle() override = default; //! @return the dimensions of the rectangle const Vector2 &getDimensions(void); diff --git a/lib/Ray/sources/Drawables/Image.cpp b/lib/Ray/sources/Drawables/Image.cpp index 0521d89a..d7c357df 100644 --- a/lib/Ray/sources/Drawables/Image.cpp +++ b/lib/Ray/sources/Drawables/Image.cpp @@ -37,13 +37,13 @@ namespace RAY { std::shared_ptr<::Image> Image::fetchImageInCache(const std::string &path) { - if (Image::_modelsCache.find(path) == Image::_modelsCache.end()) - Image::_modelsCache.emplace(path, std::shared_ptr<::Image>( + if (Image::_ImageCache.find(path) == Image::_ImageCache.end()) + Image::_ImageCache.emplace(path, std::shared_ptr<::Image>( new ::Image(LoadImage(path.c_str())), [](::Image *p) { UnloadImage(*p); delete p; })); - return _modelsCache[path]; + return _ImageCache[path]; } void Image::draw(Drawables::ADrawable2D &drawable) diff --git a/lib/Ray/sources/Drawables/Image.hpp b/lib/Ray/sources/Drawables/Image.hpp index 4ebe712a..6f6355bf 100644 --- a/lib/Ray/sources/Drawables/Image.hpp +++ b/lib/Ray/sources/Drawables/Image.hpp @@ -31,7 +31,7 @@ namespace RAY Image &operator=(const Image &image) = default; //! @brief Image destructor, will unload ressources - ~Image() = default; + ~Image() override = default; //! @brief export to file //! @param outputPath: path of output diff --git a/lib/Ray/sources/Model/Model.hpp b/lib/Ray/sources/Model/Model.hpp index 01bb5c13..47689edb 100644 --- a/lib/Ray/sources/Model/Model.hpp +++ b/lib/Ray/sources/Model/Model.hpp @@ -44,7 +44,7 @@ namespace RAY::Drawables::Drawables3D { Model& operator=(const Model &model) = default; //! @brief Model destructor, model's data will be deleted if it's the last entity alive - ~Model() = default; + ~Model() override = default; //! @brief Unload model (excluding meshes) from memory (RAM and/or VRAM) bool unloadKeepMeshes();