Skip to content

Commit

Permalink
const-correctness for get_token_name() and get_token_id()
Browse files Browse the repository at this point in the history
  • Loading branch information
tamlin-mike authored and Xottab-DUTY committed Aug 5, 2017
1 parent 3e1e4e6 commit b466f3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xrCore/_std_extensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ struct XRCORE_API xr_token
int id;
};

IC LPCSTR get_token_name(xr_token* tokens, int key)
IC LPCSTR get_token_name(const xr_token* tokens, int key)
{
for (int k = 0; tokens[k].name; k++)
if (key == tokens[k].id)
return tokens[k].name;
return "";
}

IC int get_token_id(xr_token* tokens, LPCSTR key)
IC int get_token_id(const xr_token* tokens, LPCSTR key)
{
for (int k = 0; tokens[k].name; k++)
if (_stricmp(tokens[k].name, key) == 0)
Expand Down

0 comments on commit b466f3c

Please sign in to comment.