1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Update code formatting for clang-format 19

This commit is contained in:
Michał Janiszewski
2024-12-09 23:25:40 +01:00
parent 78984e8efe
commit 6a04aaf2fa
5 changed files with 6 additions and 14 deletions

View File

@@ -236,7 +236,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
std::memcpy(&valB, &spriteCmp.field, sizeof(struc::field)); \
uintptr_t offset = reinterpret_cast<uintptr_t>(&spriteBase.field) - reinterpret_cast<uintptr_t>(&spriteBase); \
changeData.diffs.push_back( \
GameStateSpriteChange::Diff { static_cast<size_t>(offset), sizeof(struc::field), #struc, #field, valA, valB }); \
GameStateSpriteChange::Diff{ static_cast<size_t>(offset), sizeof(struc::field), #struc, #field, valA, valB }); \
}
void CompareSpriteDataCommon(

View File

@@ -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)
{

View File

@@ -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);
}

View File

@@ -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<ITcpSocket> tcpSocket;

View File

@@ -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;