Decouple <cstdint>

This commit is contained in:
Martin Natano
2023-04-20 12:34:12 +02:00
parent bcea05dd67
commit aa87f85eef
167 changed files with 1533 additions and 1307 deletions
+17 -16
View File
@@ -13,6 +13,7 @@
#include "RageFileDriver.h"
#include <cstddef>
#include <cstdint>
RageFile::RageFile()
{
@@ -110,7 +111,7 @@ void RageFile::EnableCRC32( bool on )
m_File->EnableCRC32( on );
}
bool RageFile::GetCRC32( uint32_t *iRet )
bool RageFile::GetCRC32( std::uint32_t *iRet )
{
ASSERT_OPEN;
return m_File->GetCRC32( iRet );
@@ -266,50 +267,50 @@ void FileReading::Seek( RageFileBasic &f, int iOffset, RString &sError )
sError = "Unexpected end of file";
}
uint8_t FileReading::read_8( RageFileBasic &f, RString &sError )
std::uint8_t FileReading::read_8( RageFileBasic &f, RString &sError )
{
uint8_t val;
ReadBytes( f, &val, sizeof(uint8_t), sError );
std::uint8_t val;
ReadBytes( f, &val, sizeof(std::uint8_t), sError );
if( sError.size() == 0 )
return val;
else
return 0;
}
uint16_t FileReading::read_u16_le( RageFileBasic &f, RString &sError )
std::uint16_t FileReading::read_u16_le( RageFileBasic &f, RString &sError )
{
uint16_t val;
ReadBytes( f, &val, sizeof(uint16_t), sError );
std::uint16_t val;
ReadBytes( f, &val, sizeof(std::uint16_t), sError );
if( sError.size() == 0 )
return Swap16LE( val );
else
return 0;
}
int16_t FileReading::read_16_le( RageFileBasic &f, RString &sError )
std::int16_t FileReading::read_16_le( RageFileBasic &f, RString &sError )
{
int16_t val;
ReadBytes( f, &val, sizeof(int16_t), sError );
std::int16_t val;
ReadBytes( f, &val, sizeof(std::int16_t), sError );
if( sError.size() == 0 )
return Swap16LE( val );
else
return 0;
}
uint32_t FileReading::read_u32_le( RageFileBasic &f, RString &sError )
std::uint32_t FileReading::read_u32_le( RageFileBasic &f, RString &sError )
{
uint32_t val;
ReadBytes( f, &val, sizeof(uint32_t), sError );
std::uint32_t val;
ReadBytes( f, &val, sizeof(std::uint32_t), sError );
if( sError.size() == 0 )
return Swap32LE( val );
else
return 0;
}
int32_t FileReading::read_32_le( RageFileBasic &f, RString &sError )
std::int32_t FileReading::read_32_le( RageFileBasic &f, RString &sError )
{
int32_t val;
ReadBytes( f, &val, sizeof(int32_t), sError );
std::int32_t val;
ReadBytes( f, &val, sizeof(std::int32_t), sError );
if( sError.size() == 0 )
return Swap32LE( val );
else