mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +00:00
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:
@@ -53,25 +53,25 @@ public:
|
||||
class Record // cppcheck-suppress ctuOneDefinitionRuleViolation
|
||||
{
|
||||
public:
|
||||
[[nodiscard]] float getFloat(size_t field) const
|
||||
[[nodiscard]] float getFloat(std::size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
return *reinterpret_cast<float*>(offset + field * 4);
|
||||
}
|
||||
[[nodiscard]] unsigned int getUInt(size_t field) const
|
||||
[[nodiscard]] unsigned int getUInt(std::size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
return *reinterpret_cast<unsigned int*>(offset + field * 4);
|
||||
}
|
||||
[[nodiscard]] int getInt(size_t field) const
|
||||
[[nodiscard]] int getInt(std::size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
return *reinterpret_cast<int*>(offset + field * 4);
|
||||
}
|
||||
[[nodiscard]] const char* getString(size_t field) const
|
||||
[[nodiscard]] const char* getString(std::size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
size_t stringOffset = getUInt(field);
|
||||
std::size_t stringOffset = getUInt(field);
|
||||
assert(stringOffset < file.stringSize);
|
||||
return reinterpret_cast<char*>(file.stringTable + stringOffset);
|
||||
}
|
||||
@@ -116,21 +116,21 @@ public:
|
||||
};
|
||||
|
||||
// Get record by id
|
||||
Record getRecord(size_t id);
|
||||
Record getRecord(std::size_t id);
|
||||
/// Get begin iterator over records
|
||||
Iterator begin();
|
||||
/// Get begin iterator over records
|
||||
Iterator end();
|
||||
/// Trivial
|
||||
[[nodiscard]] size_t getRecordCount() const { return recordCount;}
|
||||
[[nodiscard]] size_t getFieldCount() const { return fieldCount; }
|
||||
size_t getMaxId();
|
||||
[[nodiscard]] std::size_t getRecordCount() const { return recordCount;}
|
||||
[[nodiscard]] std::size_t getFieldCount() const { return fieldCount; }
|
||||
std::size_t getMaxId();
|
||||
private:
|
||||
std::string filename;
|
||||
size_t recordSize;
|
||||
size_t recordCount;
|
||||
size_t fieldCount;
|
||||
size_t stringSize;
|
||||
std::size_t recordSize;
|
||||
std::size_t recordCount;
|
||||
std::size_t fieldCount;
|
||||
std::size_t stringSize;
|
||||
unsigned char* data;
|
||||
unsigned char* stringTable;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user