Skip to content

Commit

Permalink
[Cleanup] Remove unnecessary reference types (#4212)
Browse files Browse the repository at this point in the history
Minor clean up from #4054 and #4181
  • Loading branch information
joligario authored Mar 28, 2024
1 parent 20d9417 commit 5241702
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions common/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ uint32 Database::GetAccountIDByName(const std::string& account_name, const std::
return e.id;
}

const std::string& Database::GetAccountName(uint32 account_id, uint32* lsaccount_id)
const std::string Database::GetAccountName(uint32 account_id, uint32* lsaccount_id)
{
const auto& e = AccountRepository::FindOne(*this, account_id);

Expand All @@ -647,28 +647,28 @@ const std::string& Database::GetAccountName(uint32 account_id, uint32* lsaccount
return e.name;
}

const std::string& Database::GetCharName(uint32 character_id)
const std::string Database::GetCharName(uint32 character_id)
{
const auto& e = CharacterDataRepository::FindOne(*this, character_id);

return e.id ? e.name : std::string();
}

const std::string& Database::GetCharNameByID(uint32 character_id)
const std::string Database::GetCharNameByID(uint32 character_id)
{
const auto& e = CharacterDataRepository::FindOne(*this, character_id);

return e.id ? e.name : std::string();
}

const std::string& Database::GetNPCNameByID(uint32 npc_id)
const std::string Database::GetNPCNameByID(uint32 npc_id)
{
const auto& e = NpcTypesRepository::FindOne(*this, npc_id);

return e.id ? e.name : std::string();
}

const std::string& Database::GetCleanNPCNameByID(uint32 npc_id)
const std::string Database::GetCleanNPCNameByID(uint32 npc_id)
{
const auto& e = NpcTypesRepository::FindOne(*this, npc_id);

Expand Down
10 changes: 5 additions & 5 deletions common/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ class Database : public DBcore {
uint32 GetGroupIDByCharID(uint32 character_id);
uint32 GetRaidIDByCharID(uint32 character_id);

const std::string& GetAccountName(uint32 account_id, uint32* lsaccount_id = 0);
const std::string& GetCharName(uint32 character_id);
const std::string& GetCharNameByID(uint32 character_id);
const std::string& GetNPCNameByID(uint32 npc_id);
const std::string& GetCleanNPCNameByID(uint32 npc_id);
const std::string GetAccountName(uint32 account_id, uint32* lsaccount_id = 0);
const std::string GetCharName(uint32 character_id);
const std::string GetCharNameByID(uint32 character_id);
const std::string GetNPCNameByID(uint32 npc_id);
const std::string GetCleanNPCNameByID(uint32 npc_id);
void LoginIP(uint32 account_id, const std::string& login_ip);

/* Instancing */
Expand Down
2 changes: 1 addition & 1 deletion zone/mob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ uint8 Mob::GetArchetype() const
return Archetype::Hybrid;
}

const std::string& Mob::GetArchetypeName()
const std::string Mob::GetArchetypeName()
{
switch (GetArchetype()) {
case Archetype::Hybrid:
Expand Down
2 changes: 1 addition & 1 deletion zone/mob.h
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ class Mob : public Entity {
bool IsPureMeleeClass() const;
bool IsWisdomCasterClass() const;
uint8 GetArchetype() const;
const std::string& GetArchetypeName();
const std::string GetArchetypeName();
void SetZone(uint32 zone_id, uint32 instance_id);
void SendStatsWindow(Client* c, bool use_window);
void ShowStats(Client* client);
Expand Down

0 comments on commit 5241702

Please sign in to comment.