mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
refactor: only use sizeof with parenthesis
This commit is contained in:
@ -44,7 +44,7 @@ void AssetDumperRawFile::DumpAsset(AssetDumpingContext& context, XAssetInfo<RawF
|
||||
while (zs.avail_in > 0)
|
||||
{
|
||||
zs.next_out = buffer;
|
||||
zs.avail_out = sizeof buffer;
|
||||
zs.avail_out = sizeof(buffer);
|
||||
ret = inflate(&zs, Z_SYNC_FLUSH);
|
||||
|
||||
if (ret < 0)
|
||||
@ -54,7 +54,7 @@ void AssetDumperRawFile::DumpAsset(AssetDumpingContext& context, XAssetInfo<RawF
|
||||
return;
|
||||
}
|
||||
|
||||
stream.write(reinterpret_cast<char*>(buffer), sizeof buffer - zs.avail_out);
|
||||
stream.write(reinterpret_cast<char*>(buffer), sizeof(buffer) - zs.avail_out);
|
||||
}
|
||||
|
||||
inflateEnd(&zs);
|
||||
|
@ -44,7 +44,7 @@ void AssetDumperRawFile::DumpAsset(AssetDumpingContext& context, XAssetInfo<RawF
|
||||
while (zs.avail_in > 0)
|
||||
{
|
||||
zs.next_out = buffer;
|
||||
zs.avail_out = sizeof buffer;
|
||||
zs.avail_out = sizeof(buffer);
|
||||
ret = inflate(&zs, Z_SYNC_FLUSH);
|
||||
|
||||
if (ret < 0)
|
||||
@ -54,7 +54,7 @@ void AssetDumperRawFile::DumpAsset(AssetDumpingContext& context, XAssetInfo<RawF
|
||||
return;
|
||||
}
|
||||
|
||||
stream.write(reinterpret_cast<char*>(buffer), sizeof buffer - zs.avail_out);
|
||||
stream.write(reinterpret_cast<char*>(buffer), sizeof(buffer) - zs.avail_out);
|
||||
}
|
||||
|
||||
inflateEnd(&zs);
|
||||
|
@ -59,7 +59,7 @@ void AssetDumperRawFile::DumpGsc(AssetDumpingContext& context, XAssetInfo<RawFil
|
||||
while (zs.avail_in > 0)
|
||||
{
|
||||
zs.next_out = buffer;
|
||||
zs.avail_out = sizeof buffer;
|
||||
zs.avail_out = sizeof(buffer);
|
||||
ret = inflate(&zs, Z_SYNC_FLUSH);
|
||||
|
||||
if (ret < 0)
|
||||
@ -69,7 +69,7 @@ void AssetDumperRawFile::DumpGsc(AssetDumpingContext& context, XAssetInfo<RawFil
|
||||
return;
|
||||
}
|
||||
|
||||
const auto inflateOutSize = sizeof buffer - zs.avail_out;
|
||||
const auto inflateOutSize = sizeof(buffer) - zs.avail_out;
|
||||
|
||||
if (writtenSize + inflateOutSize >= outLen)
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ void AssetDumperRawFile::DumpAnimtree(AssetDumpingContext& context, XAssetInfo<R
|
||||
while (zs.avail_in > 0)
|
||||
{
|
||||
zs.next_out = buffer;
|
||||
zs.avail_out = sizeof buffer;
|
||||
zs.avail_out = sizeof(buffer);
|
||||
ret = inflate(&zs, Z_SYNC_FLUSH);
|
||||
|
||||
if (ret < 0)
|
||||
@ -65,7 +65,7 @@ void AssetDumperRawFile::DumpAnimtree(AssetDumpingContext& context, XAssetInfo<R
|
||||
return;
|
||||
}
|
||||
|
||||
const auto inflateOutSize = sizeof buffer - zs.avail_out;
|
||||
const auto inflateOutSize = sizeof(buffer) - zs.avail_out;
|
||||
|
||||
stream.write(reinterpret_cast<char*>(buffer), inflateOutSize);
|
||||
}
|
||||
|
Reference in New Issue
Block a user