From 230a97a4daa69d04ad670207fd1c6fc59fe97e38 Mon Sep 17 00:00:00 2001 From: "arthur.jamet" Date: Fri, 28 May 2021 09:27:44 +0200 Subject: [PATCH] remove copy-construct-ability of textures --- lib/Ray/sources/Drawables/Texture.cpp | 5 ----- lib/Ray/sources/Drawables/Texture.hpp | 9 +++------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/Ray/sources/Drawables/Texture.cpp b/lib/Ray/sources/Drawables/Texture.cpp index 6255002e..c70fcf59 100644 --- a/lib/Ray/sources/Drawables/Texture.cpp +++ b/lib/Ray/sources/Drawables/Texture.cpp @@ -18,11 +18,6 @@ RAY::Texture::Texture(const Image &image): } -RAY::Texture::Texture() -{ - -} - RAY::Texture::~Texture() { UnloadTexture(this->_texture); diff --git a/lib/Ray/sources/Drawables/Texture.hpp b/lib/Ray/sources/Drawables/Texture.hpp index 4cd10135..81b07e0f 100644 --- a/lib/Ray/sources/Drawables/Texture.hpp +++ b/lib/Ray/sources/Drawables/Texture.hpp @@ -25,14 +25,11 @@ namespace RAY //! @param image: reference to image to create texture from Texture(const Image &image); - //! @brief A default copy constructor - Texture(const Texture &) = default; - - //! @brief A default constructor, no ressources loaded - Texture(); + //! @brief A texture is not copy constructable + Texture(const Texture &) = delete; //! @brief An image is assignable - Texture &operator=(const Texture &) = default; + Texture &operator=(const Texture &) = delete; //! @brief Texture destructor, will unload ressources ~Texture() override;