Fixed some memory leaks and uses of uninitialized values

This commit is contained in:
Yousef Khadadeh 2025-10-11 15:35:17 +03:00
parent 48156cb4bf
commit 0cc326bcc9
12 changed files with 28 additions and 21 deletions

View file

@ -85,7 +85,7 @@ class World {
void undo_with_checks();
void redo_with_checks();
ServerPortionID ownID;
ServerPortionID ownID = 0;
std::filesystem::path filePath;
Vector3f userColor = {0.0f, 0.0f, 0.0f};
@ -95,8 +95,8 @@ class World {
void set_canvas_background_color(const Vector3f& newBackColor, bool sendChangeOverNetwork = true);
struct CanvasTheme {
SkColor4f backColor;
SkColor4f toolFrontColor;
SkColor4f backColor = {0.0f, 0.0f, 0.0f, 1.0f};
SkColor4f toolFrontColor = {1.0f, 1.0f, 1.0f, 1.0f};
} canvasTheme;
void scale_up(const WorldScalar& scaleUpAmount);