From 5240db6e0fbdb0f151e9fe7af6adbc5e7f2a0b14 Mon Sep 17 00:00:00 2001 From: superp00t Date: Mon, 19 Feb 2024 01:34:23 -0500 Subject: [PATCH] chore(util): fix indentation in scoped switch cases --- src/util/SFile.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/util/SFile.cpp b/src/util/SFile.cpp index f52d68b..60c63a2 100644 --- a/src/util/SFile.cpp +++ b/src/util/SFile.cpp @@ -34,8 +34,7 @@ uint32_t SFile::GetFileSize(SFile* file, uint32_t* filesizeHigh) { uint32_t low = 0; switch (file->m_type) { - case SFILE_PAQ: - { + case SFILE_PAQ: { // Get size from stormlib DWORD dwHigh = 0; DWORD dwLow = SFileGetFileSize(file->m_handle, &dwHigh); @@ -43,8 +42,7 @@ uint32_t SFile::GetFileSize(SFile* file, uint32_t* filesizeHigh) { high = static_cast(dwHigh); break; } - case SFILE_PLAIN: - { + case SFILE_PLAIN: { uint64_t size = Blizzard::File::GetFileInfo(reinterpret_cast(file->m_handle))->size; low = size & 0xFFFFFFFF; high = size >> 32; @@ -162,14 +160,12 @@ int32_t SFile::OpenEx(SArchive* archive, const char* filename, uint32_t flags, S // TODO Proper implementation int32_t SFile::Read(SFile* file, void* buffer, size_t bytestoread, size_t* bytesread, SOVERLAPPED* overlapped, TASYNCPARAMBLOCK* asyncparam) { switch (file->m_type) { - case SFILE_PLAIN: - { + case SFILE_PLAIN: { auto stream = reinterpret_cast(file->m_handle); Blizzard::File::Read(stream, buffer, bytestoread, bytesread); return 1; } - case SFILE_PAQ: - { + case SFILE_PAQ: { DWORD read = 0; if (SFileReadFile(file->m_handle, buffer, static_cast(bytestoread), &read, nullptr)) { if (bytesread) {