const ref string instead of copy

This commit is contained in:
otavepto 2024-05-22 23:08:56 +03:00
parent a2617646e5
commit 765f3f210c
2 changed files with 3 additions and 3 deletions

View File

@ -253,7 +253,7 @@ public:
void FriendConnect(Friend _friend);
void FriendDisconnect(Friend _friend);
void AddAchievementNotification(std::string ach_name, nlohmann::json const& ach);
void AddAchievementNotification(const std::string &ach_name, nlohmann::json const& ach);
};
#else // EMU_OVERLAY
@ -287,7 +287,7 @@ public:
void FriendConnect(Friend _friend) {}
void FriendDisconnect(Friend _friend) {}
void AddAchievementNotification(std::string ach_name, nlohmann::json const& ach) {}
void AddAchievementNotification(const std::string &ach_name, nlohmann::json const& ach) {}
};
#endif // EMU_OVERLAY

View File

@ -1963,7 +1963,7 @@ void Steam_Overlay::FriendDisconnect(Friend _friend)
}
// show a notification when the user unlocks an achievement
void Steam_Overlay::AddAchievementNotification(std::string ach_name, nlohmann::json const &ach)
void Steam_Overlay::AddAchievementNotification(const std::string &ach_name, nlohmann::json const &ach)
{
PRINT_DEBUG_ENTRY();
std::lock_guard<std::recursive_mutex> lock(overlay_mutex);