diff --git a/src/core/geometry_type.hpp b/src/core/geometry_type.hpp index 062e3b1d87..9149ab2c3c 100644 --- a/src/core/geometry_type.hpp +++ b/src/core/geometry_type.hpp @@ -73,10 +73,10 @@ inline const RectPadding RectPadding::zero{}; /** Specification of a rectangle with absolute coordinates of all edges */ struct Rect { - int left; - int top; - int right; - int bottom; + int left = 0; + int top = 0; + int right = 0; + int bottom = 0; /** * Get width of Rect. @@ -232,10 +232,10 @@ struct Rect { * (relative) width/height */ struct PointDimension { - int x; - int y; - int width; - int height; + int x = 0; + int y = 0; + int width = 0; + int height = 0; }; #endif /* GEOMETRY_TYPE_HPP */ diff --git a/src/video/sdl2_opengl_v.cpp b/src/video/sdl2_opengl_v.cpp index 21d9b342a9..6ab2ff6a78 100644 --- a/src/video/sdl2_opengl_v.cpp +++ b/src/video/sdl2_opengl_v.cpp @@ -21,7 +21,6 @@ #include "../progress.h" #include "../core/random_func.hpp" #include "../core/math_func.hpp" -#include "../core/mem_func.hpp" #include "../core/geometry_func.hpp" #include "../fileio_func.h" #include "../framerate_type.h" @@ -144,7 +143,7 @@ bool VideoDriver_SDL_OpenGL::AllocateBackingStore(int w, int h, bool force) w = std::max(w, 64); h = std::max(h, 64); - MemSetT(&this->dirty_rect, 0); + this->dirty_rect = {}; bool res = OpenGLBackend::Get()->Resize(w, h, force); SDL_GL_SwapWindow(this->sdl_window); @@ -167,7 +166,7 @@ void VideoDriver_SDL_OpenGL::ReleaseVideoPointer() { if (this->anim_buffer != nullptr) OpenGLBackend::Get()->ReleaseAnimBuffer(this->dirty_rect); OpenGLBackend::Get()->ReleaseVideoBuffer(this->dirty_rect); - MemSetT(&this->dirty_rect, 0); + this->dirty_rect = {}; this->anim_buffer = nullptr; }