refactor(src/common): remove unused imports (#19506)

* refactor(src/common): remove unused imports

* fix: build

* chore: fix build

* chore: size_t -> std::size_t

* chore: fix fuckup from previous commit

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build with std::size_t

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build

* chore: fix build
This commit is contained in:
Francesco Borzì
2024-07-31 01:06:46 +02:00
committed by GitHub
parent 06a608d244
commit 02a05fbd4c
200 changed files with 522 additions and 581 deletions

View File

@@ -42,12 +42,12 @@ char* GetPlainName(char* FileName)
return FileName;
}
void fixnamen(char* name, size_t len)
void fixnamen(char* name, std::size_t len)
{
if (len < 3)
return;
for (size_t i = 0; i < len - 3; i++)
for (std::size_t i = 0; i < len - 3; i++)
{
if (i > 0 && name[i] >= 'A' && name[i] <= 'Z' && isalpha(name[i - 1]))
name[i] |= 0x20;
@@ -56,16 +56,16 @@ void fixnamen(char* name, size_t len)
}
//extension in lowercase
for (size_t i = len - 3; i < len; i++)
for (std::size_t i = len - 3; i < len; i++)
name[i] |= 0x20;
}
void fixname2(char* name, size_t len)
void fixname2(char* name, std::size_t len)
{
if (len < 3)
return;
for (size_t i = 0; i < len - 3; i++)
for (std::size_t i = 0; i < len - 3; i++)
if (name[i] == ' ')
name[i] = '_';
}
@@ -105,7 +105,7 @@ bool ADTFile::init(uint32 map_num, uint32 tileX, uint32 tileY)
flipcc(fourcc);
fourcc[4] = 0;
size_t nextpos = _file.getPos() + size;
std::size_t nextpos = _file.getPos() + size;
if (!strcmp(fourcc, "MCIN"))
{