fix: remove byte type alias

This commit is contained in:
Tropical
2026-03-06 05:03:37 -06:00
parent 09eae49d21
commit 15af35eef2
208 changed files with 700 additions and 701 deletions
@@ -10,7 +10,7 @@ void ConsoleSaveFileConverter::ProcessSimpleFile(ConsoleSaveFile *sourceSave, Fi
DWORD numberOfBytesRead = 0;
DWORD numberOfBytesWritten = 0;
byte *data = new byte[sourceFileEntry->getFileSize()];
uint8_t *data = new uint8_t[sourceFileEntry->getFileSize()];
// Read from source
sourceSave->readFile(sourceFileEntry, data, sourceFileEntry->getFileSize(), &numberOfBytesRead);
@@ -25,7 +25,7 @@ ConsoleSaveFileInputStream::ConsoleSaveFileInputStream(ConsoleSaveFile *saveFile
//the next byte of data, or -1 if the end of the file is reached.
int ConsoleSaveFileInputStream::read()
{
byte byteRead = static_cast<byte>(0);
uint8_t byteRead = static_cast<uint8_t>(0);
DWORD numberOfBytesRead;
BOOL result = m_saveFile->readFile(
@@ -243,7 +243,7 @@ void ConsoleSaveFileOriginal::deleteFile( FileEntry *file )
const int bufferSize = 4096;
int amountToRead = bufferSize;
byte buffer[bufferSize];
uint8_t buffer[bufferSize];
DWORD bufferDataSize = 0;
@@ -474,8 +474,8 @@ void ConsoleSaveFileOriginal::MoveDataBeyond(FileEntry *file, DWORD nNumberOfByt
const DWORD bufferSize = 4096;
DWORD amountToRead = bufferSize;
//assert( nNumberOfBytesToWrite <= bufferSize );
static byte buffer1[bufferSize];
static byte buffer2[bufferSize];
static uint8_t buffer1[bufferSize];
static uint8_t buffer2[bufferSize];
DWORD buffer1Size = 0;
DWORD buffer2Size = 0;
@@ -666,11 +666,11 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail )
// On PS3, don't compress the data as we can't really afford the extra memory this requires for the output buffer. Instead we'll be writing
// directly from the save data.
StorageManager.SetSaveData(pvSaveMem,fileSize);
byte *compData = (byte *)pvSaveMem;
uint8_t *compData = (uint8_t *)pvSaveMem;
#else
// Attempt to allocate the required memory
// We do not own this, it belongs to the StorageManager
byte *compData = (byte *)StorageManager.AllocateSaveData( compLength );
uint8_t *compData = (uint8_t *)StorageManager.AllocateSaveData( compLength );
#ifdef __PSVITA__
// AP - make sure we always allocate just what is needed so it will only SAVE what is needed.
@@ -708,7 +708,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail )
compLength = compLength+8;
// Attempt to allocate the required memory
compData = (byte *)StorageManager.AllocateSaveData( compLength );
compData = (uint8_t *)StorageManager.AllocateSaveData( compLength );
}
#endif
@@ -38,7 +38,7 @@ void ConsoleSaveFileOutputStream::write(unsigned int b)
{
DWORD numberOfBytesWritten;
byte value = (byte) b;
uint8_t value = (uint8_t) b;
BOOL result = m_saveFile->writeFile(
m_file,
@@ -641,7 +641,7 @@ void ConsoleSaveFileSplit::deleteFile( FileEntry *file )
const int bufferSize = 4096;
int amountToRead = bufferSize;
byte buffer[bufferSize];
uint8_t buffer[bufferSize];
DWORD bufferDataSize = 0;
@@ -1044,8 +1044,8 @@ void ConsoleSaveFileSplit::MoveDataBeyond(FileEntry *file, DWORD nNumberOfBytesT
const DWORD bufferSize = 4096;
DWORD amountToRead = bufferSize;
//assert( nNumberOfBytesToWrite <= bufferSize );
static byte buffer1[bufferSize];
static byte buffer2[bufferSize];
static uint8_t buffer1[bufferSize];
static uint8_t buffer2[bufferSize];
DWORD buffer1Size = 0;
DWORD buffer2Size = 0;
@@ -1352,7 +1352,7 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail)
// Attempt to allocate the required memory
// We do not own this, it belongs to the StorageManager
byte *compData = (byte *)StorageManager.AllocateSaveData( compLength );
uint8_t *compData = (uint8_t *)StorageManager.AllocateSaveData( compLength );
// If we failed to allocate then compData will be NULL
// Pre-calculate the compressed data size so that we can attempt to allocate a smaller buffer
@@ -1379,7 +1379,7 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail)
compLength = compLength+8;
// Attempt to allocate the required memory
compData = (byte *)StorageManager.AllocateSaveData( compLength );
compData = (uint8_t *)StorageManager.AllocateSaveData( compLength );
}
if(compData != NULL)
+1 -1
View File
@@ -84,7 +84,7 @@ ssize_t ReadFile(int fd, void* buffer, size_t byteRead, DWORD* numberOfBytesRead
//the next byte of data, or -1 if the end of the file is reached.
int FileInputStream::read()
{
byte byteRead = static_cast<byte>(0);
uint8_t byteRead = static_cast<uint8_t>(0);
DWORD numberOfBytesRead;
BOOL bSuccess = ReadFile(
@@ -74,7 +74,7 @@ FileOutputStream::~FileOutputStream()
//b - the byte to be written.
void FileOutputStream::write(unsigned int b)
{
byte value = (byte) b;
uint8_t value = (uint8_t) b;
#if defined(_WIN32)
BOOL result = WriteFile(