Skip to content

Commit 2a1738e

Browse files
committed
update TextureUnmanaged
Added nodiscard, I forgot this file
1 parent 7a8a6eb commit 2a1738e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/TextureUnmanaged.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class TextureUnmanaged : public ::Texture {
8989
/**
9090
* Retrieve the width and height of the texture.
9191
*/
92-
Vector2 GetSize() const { return {static_cast<float>(width), static_cast<float>(height)}; }
92+
[[nodiscard]] Vector2 GetSize() const { return {static_cast<float>(width), static_cast<float>(height)}; }
9393

9494
/**
9595
* Load texture from image data
@@ -151,7 +151,7 @@ class TextureUnmanaged : public ::Texture {
151151
/**
152152
* Get pixel data from GPU texture and return an Image
153153
*/
154-
::Image GetData() const { return ::LoadImageFromTexture(*this); }
154+
[[nodiscard]] ::Image GetData() const { return ::LoadImageFromTexture(*this); }
155155

156156
/**
157157
* Get pixel data from GPU texture and return an Image
@@ -319,7 +319,7 @@ class TextureUnmanaged : public ::Texture {
319319
*
320320
* @return True or false depending on whether the Texture has data.
321321
*/
322-
bool IsValid() const { return IsTextureValid(*this); }
322+
[[nodiscard]] bool IsValid() const { return IsTextureValid(*this); }
323323
protected:
324324
void set(const ::Texture& texture) {
325325
id = texture.id;

0 commit comments

Comments
 (0)