Skip to content

Commit

Permalink
fix: renamed GetObject to GetObjectAlt internally to avoid msvc macro…
Browse files Browse the repository at this point in the history
… interference
  • Loading branch information
ADRFranklin committed Nov 25, 2022
1 parent 7f81a8a commit 630ed5a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/natives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ int Natives::JSON::SetString(AMX *amx, cell *params)
return 0;
}

int Natives::JSON::GetObject(AMX *amx, cell *params)
int Natives::JSON::GetObjectAlt(AMX *amx, cell *params)
{
web::json::value obj = Get(params[1]);
if (obj == web::json::value::null())
Expand Down
2 changes: 1 addition & 1 deletion src/natives.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace Natives
int SetFloat(AMX *amx, cell *params);
int SetBool(AMX *amx, cell *params);
int SetString(AMX *amx, cell *params);
int GetObject(AMX *amx, cell *params);
int GetObjectAlt(AMX *amx, cell *params);
int GetInt(AMX *amx, cell *params);
int GetFloat(AMX *amx, cell *params);
int GetBool(AMX *amx, cell *params);
Expand Down
2 changes: 1 addition & 1 deletion src/requests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" AMX_NATIVE_INFO amx_Natives[] = {
{"JsonSetFloat", Natives::JSON::SetFloat},
{"JsonSetBool", Natives::JSON::SetBool},
{"JsonSetString", Natives::JSON::SetString},
{"JsonGetObject", Natives::JSON::GetObject},
{"JsonGetObject", Natives::JSON::GetObjectAlt}, // renamed due to a msvc macro interfering
{"JsonGetInt", Natives::JSON::GetInt},
{"JsonGetFloat", Natives::JSON::GetFloat},
{"JsonGetBool", Natives::JSON::GetBool},
Expand Down

0 comments on commit 630ed5a

Please sign in to comment.