Use size_t in some DSP code code
This commit is contained in:
@@ -68,11 +68,11 @@ bool Compare(const std::vector<u16>& code1, const std::vector<u16>& code2)
|
||||
if (code1.size() != code2.size())
|
||||
printf("Size difference! 1=%zu 2=%zu\n", code1.size(), code2.size());
|
||||
u32 count_equal = 0;
|
||||
const int min_size = std::min<int>((int)code1.size(), (int)code2.size());
|
||||
const u16 min_size = static_cast<u16>(std::min(code1.size(), code2.size()));
|
||||
|
||||
AssemblerSettings settings;
|
||||
DSPDisassembler disassembler(settings);
|
||||
for (int i = 0; i < min_size; i++)
|
||||
for (u16 i = 0; i < min_size; i++)
|
||||
{
|
||||
if (code1[i] == code2[i])
|
||||
{
|
||||
@@ -93,7 +93,7 @@ bool Compare(const std::vector<u16>& code1, const std::vector<u16>& code2)
|
||||
{
|
||||
printf("Extra code words:\n");
|
||||
const std::vector<u16>& longest = code1.size() > code2.size() ? code1 : code2;
|
||||
for (int i = min_size; i < (int)longest.size(); i++)
|
||||
for (u16 i = min_size; i < longest.size(); i++)
|
||||
{
|
||||
u16 pc = i;
|
||||
std::string line;
|
||||
@@ -146,7 +146,7 @@ bool SaveBinary(const std::vector<u16>& code, const std::string& filename)
|
||||
return File::WriteStringToFile(filename, buffer);
|
||||
}
|
||||
|
||||
bool DumpDSPCode(const u8* code_be, int size_in_bytes, u32 crc)
|
||||
bool DumpDSPCode(const u8* code_be, size_t size_in_bytes, u32 crc)
|
||||
{
|
||||
const std::string root_name =
|
||||
File::GetUserPath(D_DUMPDSP_IDX) + fmt::format("DSP_UC_{:08X}", crc);
|
||||
|
||||
Reference in New Issue
Block a user