Skip to content

Commit 34c4b79

Browse files
committed
Deprecate get_location_name without game
1 parent deb1234 commit 34c4b79

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

apclient.hpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ class APClient {
675675
return BLANK;
676676
}
677677

678-
std::string get_location_name(int64_t code, const std::string& game="")
678+
std::string get_location_name(int64_t code, const std::string& game)
679679
{
680680
if (game.empty()) { // old code path ("global" ids)
681681
auto it = _locations.find(code);
@@ -693,6 +693,12 @@ class APClient {
693693
return "Unknown";
694694
}
695695

696+
[[deprecated("Use the overload that explicitly takes game argument")]]
697+
std::string get_location_name(int64_t code)
698+
{
699+
return get_location_name(code, "");
700+
}
701+
696702
/*Usage is not recommended
697703
* Return the id associated with the location name
698704
* Return APClient::INVALID_NAME_ID when undefined*/
@@ -707,7 +713,7 @@ class APClient {
707713
return INVALID_NAME_ID;
708714
}
709715

710-
std::string get_item_name(int64_t code, const std::string& game="")
716+
std::string get_item_name(int64_t code, const std::string& game)
711717
{
712718
if (game.empty()) { // old code path ("global" ids)
713719
auto it = _items.find(code);
@@ -725,6 +731,12 @@ class APClient {
725731
return "Unknown";
726732
}
727733

734+
[[deprecated("Use the overload that explicitly takes game argument")]]
735+
std::string get_item_name(int64_t code)
736+
{
737+
return get_item_name(code, "");
738+
}
739+
728740
/*Usage is not recommended
729741
* Return the id associated with the item name
730742
* Return APClient::INVALID_NAME_ID when undefined*/

0 commit comments

Comments
 (0)