mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
[Cleanup] Cleanup code smells and compiler warnings in common/shareddb (#2270)
* Apply refactoring for modernize-use-default-equals * Apply refactoring for const local variable * Replace c-style cast with static_cast<> * Explicit cast double to float to remove compiler warning * Make member functions const when possible * Correct [lnt-accidental-copy] by changing auto to auto& * Use static_cast instead of reinterpret_cast when appropriate * Remove unneeded initial values when assigned in all paths and joined delcaration and assignment when possible * Remove unused include * Make member function in header const
This commit is contained in:
parent
0c01872608
commit
2c0716f654
File diff suppressed because it is too large
Load Diff
@ -143,15 +143,15 @@ public:
|
|||||||
void GetItemsCount(int32 &item_count, uint32 &max_id);
|
void GetItemsCount(int32 &item_count, uint32 &max_id);
|
||||||
void LoadItems(void *data, uint32 size, int32 items, uint32 max_item_id);
|
void LoadItems(void *data, uint32 size, int32 items, uint32 max_item_id);
|
||||||
bool LoadItems(const std::string &prefix);
|
bool LoadItems(const std::string &prefix);
|
||||||
const EQ::ItemData *IterateItems(uint32 *id);
|
const EQ::ItemData *IterateItems(uint32 *id) const;
|
||||||
const EQ::ItemData *GetItem(uint32 id);
|
const EQ::ItemData *GetItem(uint32 id) const;
|
||||||
const EvolveInfo *GetEvolveInfo(uint32 loregroup);
|
const EvolveInfo *GetEvolveInfo(uint32 loregroup);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* faction
|
* faction
|
||||||
*/
|
*/
|
||||||
void GetFactionListInfo(uint32 &list_count, uint32 &max_lists);
|
void GetFactionListInfo(uint32 &list_count, uint32 &max_lists);
|
||||||
const NPCFactionList *GetNPCFactionEntry(uint32 id);
|
const NPCFactionList *GetNPCFactionEntry(uint32 id) const;
|
||||||
void LoadNPCFactionLists(void *data, uint32 size, uint32 list_count, uint32 max_lists);
|
void LoadNPCFactionLists(void *data, uint32 size, uint32 list_count, uint32 max_lists);
|
||||||
bool LoadNPCFactionLists(const std::string &prefix);
|
bool LoadNPCFactionLists(const std::string &prefix);
|
||||||
|
|
||||||
@ -163,16 +163,16 @@ public:
|
|||||||
void LoadLootTables(void *data, uint32 size);
|
void LoadLootTables(void *data, uint32 size);
|
||||||
void LoadLootDrops(void *data, uint32 size);
|
void LoadLootDrops(void *data, uint32 size);
|
||||||
bool LoadLoot(const std::string &prefix);
|
bool LoadLoot(const std::string &prefix);
|
||||||
const LootTable_Struct *GetLootTable(uint32 loottable_id);
|
const LootTable_Struct *GetLootTable(uint32 loottable_id) const;
|
||||||
const LootDrop_Struct *GetLootDrop(uint32 lootdrop_id);
|
const LootDrop_Struct *GetLootDrop(uint32 lootdrop_id) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* skills
|
* skills
|
||||||
*/
|
*/
|
||||||
void LoadSkillCaps(void *data);
|
void LoadSkillCaps(void *data);
|
||||||
bool LoadSkillCaps(const std::string &prefix);
|
bool LoadSkillCaps(const std::string &prefix);
|
||||||
uint16 GetSkillCap(uint8 Class_, EQ::skills::SkillType Skill, uint8 Level);
|
uint16 GetSkillCap(uint8 Class_, EQ::skills::SkillType Skill, uint8 Level) const;
|
||||||
uint8 GetTrainLevel(uint8 Class_, EQ::skills::SkillType Skill, uint8 Level);
|
uint8 GetTrainLevel(uint8 Class_, EQ::skills::SkillType Skill, uint8 Level) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spells
|
* spells
|
||||||
@ -188,9 +188,10 @@ public:
|
|||||||
int GetMaxBaseDataLevel();
|
int GetMaxBaseDataLevel();
|
||||||
bool LoadBaseData(const std::string &prefix);
|
bool LoadBaseData(const std::string &prefix);
|
||||||
void LoadBaseData(void *data, int max_level);
|
void LoadBaseData(void *data, int max_level);
|
||||||
const BaseDataStruct *GetBaseData(int lvl, int cl);
|
const BaseDataStruct *GetBaseData(int lvl, int cl) const;
|
||||||
|
|
||||||
std::string CreateItemLink(uint32 item_id) {
|
std::string CreateItemLink(uint32 item_id) const
|
||||||
|
{
|
||||||
EQ::SayLinkEngine linker;
|
EQ::SayLinkEngine linker;
|
||||||
linker.SetLinkType(EQ::saylink::SayLinkItemData);
|
linker.SetLinkType(EQ::saylink::SayLinkItemData);
|
||||||
const EQ::ItemData *item = GetItem(item_id);
|
const EQ::ItemData *item = GetItem(item_id);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user