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

@@ -58,7 +58,7 @@ bool DBCFile::open()
data = new unsigned char[recordSize * recordCount + stringSize];
stringTable = data + recordSize * recordCount;
size_t data_size = recordSize * recordCount + stringSize;
std::size_t data_size = recordSize * recordCount + stringSize;
if (f.read(data, data_size) != data_size)
return false;
f.close();
@@ -69,18 +69,18 @@ DBCFile::~DBCFile()
delete [] data;
}
DBCFile::Record DBCFile::getRecord(size_t id)
DBCFile::Record DBCFile::getRecord(std::size_t id)
{
assert(data);
return Record(*this, data + id * recordSize);
}
size_t DBCFile::getMaxId()
std::size_t DBCFile::getMaxId()
{
assert(data);
size_t maxId = 0;
for (size_t i = 0; i < getRecordCount(); ++i)
std::size_t maxId = 0;
for (std::size_t i = 0; i < getRecordCount(); ++i)
{
if (maxId < getRecord(i).getUInt(0))
maxId = getRecord(i).getUInt(0);