diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index d8e046f95e..51df1036f4 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -236,7 +236,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots std::memcpy(&valB, &spriteCmp.field, sizeof(struc::field)); \ uintptr_t offset = reinterpret_cast(&spriteBase.field) - reinterpret_cast(&spriteBase); \ changeData.diffs.push_back( \ - GameStateSpriteChange::Diff { static_cast(offset), sizeof(struc::field), #struc, #field, valA, valB }); \ + GameStateSpriteChange::Diff{ static_cast(offset), sizeof(struc::field), #struc, #field, valA, valB }); \ } void CompareSpriteDataCommon( diff --git a/src/openrct2/core/FileScanner.cpp b/src/openrct2/core/FileScanner.cpp index 321babd957..7d29d65130 100644 --- a/src/openrct2/core/FileScanner.cpp +++ b/src/openrct2/core/FileScanner.cpp @@ -303,9 +303,7 @@ private: // Get the full path of the file auto path = Path::Combine(directory, node->d_name); - struct stat statInfo - { - }; + struct stat statInfo{}; int32_t statRes = stat(path.c_str(), &statInfo); if (statRes != -1) { diff --git a/src/openrct2/interface/Viewport.cpp b/src/openrct2/interface/Viewport.cpp index 1c388ce69d..2418dc884e 100644 --- a/src/openrct2/interface/Viewport.cpp +++ b/src/openrct2/interface/Viewport.cpp @@ -709,7 +709,7 @@ void ViewportUpdateFollowSprite(WindowBase* window) if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) { - int32_t height = (TileElementHeight({ sprite->x, sprite->y })) - 16; + int32_t height = (TileElementHeight({ sprite->x, sprite->y }))-16; int32_t underground = sprite->z < height; ViewportSetUndergroundFlag(underground, window, window->viewport); } diff --git a/src/openrct2/network/Socket.cpp b/src/openrct2/network/Socket.cpp index 68567f6c71..b14a17c75a 100644 --- a/src/openrct2/network/Socket.cpp +++ b/src/openrct2/network/Socket.cpp @@ -368,9 +368,7 @@ public: { throw std::runtime_error("Socket not listening."); } - struct sockaddr_storage client_addr - { - }; + struct sockaddr_storage client_addr{}; socklen_t client_len = sizeof(struct sockaddr_storage); std::unique_ptr tcpSocket; diff --git a/src/openrct2/platform/Platform.Posix.cpp b/src/openrct2/platform/Platform.Posix.cpp index 55a91fd8af..583949babc 100644 --- a/src/openrct2/platform/Platform.Posix.cpp +++ b/src/openrct2/platform/Platform.Posix.cpp @@ -169,9 +169,7 @@ namespace OpenRCT2::Platform uint64_t GetLastModified(std::string_view path) { uint64_t lastModified = 0; - struct stat statInfo - { - }; + struct stat statInfo{}; if (stat(std::string(path).c_str(), &statInfo) == 0) { lastModified = statInfo.st_mtime; @@ -182,9 +180,7 @@ namespace OpenRCT2::Platform uint64_t GetFileSize(std::string_view path) { uint64_t size = 0; - struct stat statInfo - { - }; + struct stat statInfo{}; if (stat(std::string(path).c_str(), &statInfo) == 0) { size = statInfo.st_size;