1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-23 21:22:46 +01:00

Codechange: explicitly initialise member variables of Windows

This commit is contained in:
Rubidium
2025-02-22 18:51:21 +01:00
committed by rubidium42
parent 566a5196f2
commit f69968f2bc
12 changed files with 131 additions and 152 deletions

View File

@@ -30,8 +30,8 @@
#include "safeguards.h"
struct EndGameHighScoreBaseWindow : Window {
uint32_t background_img;
int8_t rank;
SpriteID background_img{};
int8_t rank = 0;
EndGameHighScoreBaseWindow(WindowDesc &desc) : Window(desc)
{
@@ -156,7 +156,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
};
struct HighScoreWindow : EndGameHighScoreBaseWindow {
bool game_paused_by_player; ///< True if the game was paused by the player when the highscore window was opened.
bool game_paused_by_player = false; ///< True if the game was paused by the player when the highscore window was opened.
HighScoreWindow(WindowDesc &desc, int difficulty, int8_t ranking) : EndGameHighScoreBaseWindow(desc)
{