Mark draw RAII getters [[nodiscard]]

This commit is contained in:
Charles Dang 2024-08-13 21:56:46 -04:00
parent 8baf95601d
commit dac8f6f5e0

View file

@ -357,7 +357,7 @@ private:
* the clipping region will be restored to whatever
* it was before this call.
*/
clip_setter override_clip(const SDL_Rect& clip);
[[nodiscard]] clip_setter override_clip(const SDL_Rect& clip);
/**
* Set the clipping area to the intersection of the current clipping
@ -365,7 +365,7 @@ clip_setter override_clip(const SDL_Rect& clip);
*
* Otherwise acts as override_clip().
*/
clip_setter reduce_clip(const SDL_Rect& clip);
[[nodiscard]] clip_setter reduce_clip(const SDL_Rect& clip);
/**
* Set the clipping area, without any provided way of setting it back.
@ -436,7 +436,7 @@ private:
* destroyed the viewport will be restored to whatever
* it was before this call.
*/
viewport_setter set_viewport(const SDL_Rect& viewport);
[[nodiscard]] viewport_setter set_viewport(const SDL_Rect& viewport);
/**
* Set the viewport, without any provided way of setting it back.
@ -499,7 +499,7 @@ private:
* destroyed the render target will be restored to
* whatever it was before this call.
*/
render_target_setter set_render_target(const texture& t);
[[nodiscard]] render_target_setter set_render_target(const texture& t);
} // namespace draw