2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-05-17 07:21:43 +00:00

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
+3 -3
View File
@@ -46,8 +46,8 @@ class IPak::Impl : public ObjContainerReferenceable
for (unsigned itemIndex = 0; itemIndex < m_index_section->itemCount; itemIndex++)
{
m_stream->read(reinterpret_cast<char*>(&indexEntry), sizeof indexEntry);
if (m_stream->gcount() != sizeof indexEntry)
m_stream->read(reinterpret_cast<char*>(&indexEntry), sizeof(indexEntry));
if (m_stream->gcount() != sizeof(indexEntry))
{
printf("Unexpected eof when trying to load index entry %u.\n", itemIndex);
return false;
@@ -99,7 +99,7 @@ class IPak::Impl : public ObjContainerReferenceable
IPakHeader header{};
m_stream->read(reinterpret_cast<char*>(&header), sizeof(header));
if (m_stream->gcount() != sizeof header)
if (m_stream->gcount() != sizeof(header))
{
printf("Unexpected eof when trying to load header.\n");
return false;