diff --git a/src/sdl/rect.cpp b/src/sdl/rect.cpp index f01c5f0d2f1..38cd0169bba 100644 --- a/src/sdl/rect.cpp +++ b/src/sdl/rect.cpp @@ -86,3 +86,9 @@ bool operator!=(const SDL_Rect& a, const SDL_Rect& b) { return !operator==(a,b); } + +std::ostream& operator<<(std::ostream& s, const SDL_Rect& rect) +{ + s << "x: " << rect.x << ", y: " << rect.y << ", w: " << rect.w << ", h: " << rect.h; + return s; +} diff --git a/src/sdl/utils.cpp b/src/sdl/utils.cpp index 0b295bb39bd..833e2df485f 100644 --- a/src/sdl/utils.cpp +++ b/src/sdl/utils.cpp @@ -2213,17 +2213,10 @@ void draw_centered_on_background(surface surf, const SDL_Rect& rect, const color } } -std::ostream& operator<<(std::ostream& s, const SDL_Rect& rect) -{ - s << rect.x << ',' << rect.y << " x " << rect.w << ',' << rect.h; - return s; -} - SDL_Color color_t::to_sdl() const { return {r, g, b, a}; } - color_t::color_t(const SDL_Color& c) : r(c.r) , g(c.g)