Use [[nodiscard]] attribute more sparingly

Removed all uses of the [[nodiscard]] attribute unless ignoring the
return value would lead to an error or leak e.g. memory allocations.
This commit is contained in:
2025-06-26 20:28:21 +10:00
parent d89f8de08f
commit 04eec1b703
4 changed files with 30 additions and 28 deletions

View File

@@ -19,13 +19,13 @@ namespace Nova {
static WindowDriver* create();
virtual ~WindowDriver() = default;
[[nodiscard]] virtual WindowAPI get_api() const = 0;
[[nodiscard]] virtual std::string get_api_name() const = 0;
virtual WindowAPI get_api() const = 0;
virtual std::string get_api_name() const = 0;
virtual void poll_events() = 0;
virtual void beep() = 0;
[[nodiscard]] virtual u32 get_window_count() const = 0;
virtual u32 get_window_count() const = 0;
[[nodiscard]] virtual WindowID create_window(std::string_view title, u32 width, u32 height) = 0;
virtual void destroy_window(WindowID window) = 0;
@@ -33,7 +33,7 @@ namespace Nova {
virtual void set_window_size(WindowID window, u32 width, u32 height) = 0;
virtual void set_window_position(WindowID window, i32 x, i32 y) = 0;
[[nodiscard]] virtual const char* get_surface_extension() const = 0;
virtual const char* get_surface_extension() const = 0;
[[nodiscard]] virtual SurfaceID create_surface(WindowID window, RenderDriver* driver) = 0;
};
} // namespace Nova