refactor: only use sizeof with parenthesis

This commit is contained in:
Jan
2024-03-24 19:56:06 +01:00
parent 4f0ee35740
commit 1b13f1f1b4
16 changed files with 33 additions and 33 deletions

View File

@ -126,7 +126,7 @@ protected:
while (skipAmount > 0)
{
char temp[1024];
const auto toRead = skipAmount > sizeof temp ? sizeof temp : static_cast<size_t>(skipAmount);
const auto toRead = skipAmount > sizeof(temp) ? sizeof(temp) : static_cast<size_t>(skipAmount);
unzReadCurrentFile(m_container, temp, toRead);
skipAmount -= toRead;
}
@ -216,7 +216,7 @@ public:
{
unz_file_info64 info;
char fileNameBuffer[256];
unzGetCurrentFileInfo64(m_unz_file, &info, fileNameBuffer, sizeof fileNameBuffer, nullptr, 0, nullptr, 0);
unzGetCurrentFileInfo64(m_unz_file, &info, fileNameBuffer, sizeof(fileNameBuffer), nullptr, 0, nullptr, 0);
std::string fileName(fileNameBuffer);
std::filesystem::path path(fileName);