mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
refactor: fix x64 compilation issues in Common,ObjCommon,ObjCompiling,ObjImage components
This commit is contained in:
@ -42,14 +42,14 @@ uint32_t CommonStructuredDataEnum::CalculateChecksum(const uint32_t initialValue
|
||||
{
|
||||
auto checksum = initialValue;
|
||||
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(m_name.c_str()), m_name.size() + 1);
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(m_name.c_str()), static_cast<unsigned>(m_name.size() + 1u));
|
||||
|
||||
const auto littleEndianElementCount = endianness::ToLittleEndian(ElementCount());
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(&littleEndianElementCount), sizeof(littleEndianElementCount));
|
||||
|
||||
for (const auto& entry : m_entries)
|
||||
{
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(entry.m_name.c_str()), entry.m_name.size() + 1);
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(entry.m_name.c_str()), static_cast<unsigned>(entry.m_name.size() + 1));
|
||||
|
||||
const auto littleEndianValue = endianness::ToLittleEndian(entry.m_value);
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(&littleEndianValue), sizeof(littleEndianValue));
|
||||
|
@ -41,10 +41,10 @@ uint32_t CommonStructuredDataStruct::CalculateChecksum(const CommonStructuredDat
|
||||
{
|
||||
auto checksum = initialValue;
|
||||
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(m_name.c_str()), m_name.size() + 1);
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(m_name.c_str()), static_cast<unsigned>(m_name.size() + 1u));
|
||||
for (const auto& property : m_properties)
|
||||
{
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(property.m_name.c_str()), property.m_name.size() + 1);
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(property.m_name.c_str()), static_cast<unsigned>(property.m_name.size() + 1u));
|
||||
|
||||
const auto littleEndianOffset = endianness::ToLittleEndian(property.m_offset_in_bits);
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(&littleEndianOffset), sizeof(littleEndianOffset));
|
||||
@ -68,7 +68,7 @@ uint32_t CommonStructuredDataStruct::CalculateChecksum(const CommonStructuredDat
|
||||
if (currentType.m_info.type_index < def.m_enums.size())
|
||||
{
|
||||
const auto& _enum = *def.m_enums[currentType.m_info.type_index];
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(_enum.m_name.c_str()), _enum.m_name.size() + 1);
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(_enum.m_name.c_str()), static_cast<unsigned>(_enum.m_name.size() + 1u));
|
||||
currentType = CommonStructuredDataType(CommonStructuredDataTypeCategory::UNKNOWN);
|
||||
}
|
||||
break;
|
||||
@ -76,7 +76,7 @@ uint32_t CommonStructuredDataStruct::CalculateChecksum(const CommonStructuredDat
|
||||
if (currentType.m_info.type_index < def.m_structs.size())
|
||||
{
|
||||
const auto& _struct = *def.m_structs[currentType.m_info.type_index];
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(_struct.m_name.c_str()), _struct.m_name.size() + 1);
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(_struct.m_name.c_str()), static_cast<unsigned>(_struct.m_name.size() + 1u));
|
||||
currentType = CommonStructuredDataType(CommonStructuredDataTypeCategory::UNKNOWN);
|
||||
}
|
||||
break;
|
||||
@ -99,7 +99,7 @@ uint32_t CommonStructuredDataStruct::CalculateChecksum(const CommonStructuredDat
|
||||
if (enumedArray.m_enum_index < def.m_enums.size())
|
||||
{
|
||||
const auto& _enum = *def.m_enums[enumedArray.m_enum_index];
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(_enum.m_name.c_str()), _enum.m_name.size() + 1);
|
||||
checksum = crc32(checksum, reinterpret_cast<const Bytef*>(_enum.m_name.c_str()), static_cast<unsigned>(_enum.m_name.size() + 1u));
|
||||
}
|
||||
currentType = enumedArray.m_array_type;
|
||||
}
|
||||
|
Reference in New Issue
Block a user