diff options
| author | hachem <im@hachem.wtf> | 2026-08-20 02:12:52 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-20 02:25:57 +0200 |
| commit | 0f9483ce025b015b1197b7a7efc8ed983bedbb8e (patch) | |
| tree | 3984c728052cb21e88550248f3ff2fb2fece41a3 /src/rendering/texture.h | |
| parent | 0802ee19573e880e319a61ae814ee42c01e28cd3 (diff) | |
refactor: trailing return types in rendering
Diffstat (limited to 'src/rendering/texture.h')
| -rw-r--r-- | src/rendering/texture.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rendering/texture.h b/src/rendering/texture.h index 195605c..d7f3050 100644 --- a/src/rendering/texture.h +++ b/src/rendering/texture.h @@ -12,12 +12,12 @@ namespace Donut public: virtual ~Texture() = default; - virtual uint32_t get_width() const = 0; - virtual uint32_t get_height() const = 0; - virtual uint32_t get_renderer_id() const = 0; + virtual auto get_width() const -> uint32_t = 0; + virtual auto get_height() const -> uint32_t = 0; + virtual auto get_renderer_id() const -> uint32_t = 0; - virtual void set_data(void* data, uint32_t size) = 0; - virtual void bind(uint32_t slot = 0) const = 0; + virtual auto set_data(void* data, uint32_t size) -> void = 0; + virtual auto bind(uint32_t slot = 0) const -> void = 0; virtual void bind_as_image(uint32_t slot = 0, bool read_only = false) const = 0; @@ -28,15 +28,15 @@ namespace Donut : public Texture { public: - static Ref<Texture2D> create(uint32_t width, uint32_t height); - static Ref<Texture2D> create(const std::string& path); + static auto create(uint32_t width, uint32_t height) -> Ref<Texture2D>; + static auto create(const std::string& path) -> Ref<Texture2D>; }; class CubemapTexture : public Texture { public: - static Ref<CubemapTexture> create(uint32_t width, uint32_t height); - static Ref<CubemapTexture> create_from_hdri(const std::string& path); + static auto create(uint32_t width, uint32_t height) -> Ref<CubemapTexture>; + static auto create_from_hdri(const std::string& path) -> Ref<CubemapTexture>; }; }; |
