From 1ea5a902df56a550554036c000a2c3aacc338284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 30 Jul 2017 15:28:16 +0200 Subject: [PATCH] Initialise various fields and variables --- src/openrct2/network/http.h | 2 +- src/openrct2/network/network.h | 2 +- src/openrct2/title/TitleScreen.cpp | 2 +- src/openrct2/title/TitleScreen.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openrct2/network/http.h b/src/openrct2/network/http.h index 10f1099cc6..e9ca9ea572 100644 --- a/src/openrct2/network/http.h +++ b/src/openrct2/network/http.h @@ -31,7 +31,7 @@ typedef struct http_request_t { void *tag; const char *method; const char *url; - http_data_type type; + http_data_type type = HTTP_DATA_NONE; size_t size; union { const json_t *root; diff --git a/src/openrct2/network/network.h b/src/openrct2/network/network.h index 7373bfefd7..c751734a0c 100644 --- a/src/openrct2/network/network.h +++ b/src/openrct2/network/network.h @@ -234,7 +234,7 @@ private: std::string _chatLogFilenameFormat = "%Y%m%d-%H%M%S.txt"; std::string _serverLogPath; std::string _serverLogFilenameFormat = "-%Y%m%d-%H%M%S.txt"; - OpenRCT2::IPlatformEnvironment * _env; + OpenRCT2::IPlatformEnvironment * _env = nullptr; void UpdateServer(); void UpdateClient(); diff --git a/src/openrct2/title/TitleScreen.cpp b/src/openrct2/title/TitleScreen.cpp index b05b623565..335ae990e9 100644 --- a/src/openrct2/title/TitleScreen.cpp +++ b/src/openrct2/title/TitleScreen.cpp @@ -38,7 +38,7 @@ extern "C" } // TODO Remove when no longer required. -static TitleScreen * _singleton; +static TitleScreen * _singleton = nullptr; TitleScreen::TitleScreen() { diff --git a/src/openrct2/title/TitleScreen.h b/src/openrct2/title/TitleScreen.h index cf1f18bb03..aa47551984 100644 --- a/src/openrct2/title/TitleScreen.h +++ b/src/openrct2/title/TitleScreen.h @@ -41,8 +41,8 @@ public: private: ITitleSequencePlayer * _sequencePlayer = nullptr; uint16 _loadedTitleSequenceId = UINT16_MAX; - uint16 _currentSequence; - bool _hideVersionInfo; + uint16 _currentSequence = UINT16_MAX; + bool _hideVersionInfo = false; void TitleInitialise(); void TryLoadSequence();