mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-02-03 07:45:31 +03:00
Make const the 'hex' argument of is_positive_num()
Always good to get in the habit of clearly marking arguments you won't mutate as const. Makes the code easier to read.
This commit is contained in:
@@ -284,7 +284,7 @@ static bool VVV_isxdigit(const unsigned char digit)
|
|||||||
|| SDL_isdigit(digit);
|
|| SDL_isdigit(digit);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_positive_num(const std::string& str, bool hex)
|
bool is_positive_num(const std::string& str, const bool hex)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < str.length(); i++)
|
for (size_t i = 0; i < str.length(); i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ bool next_split_s(
|
|||||||
|
|
||||||
bool is_number(const char* str);
|
bool is_number(const char* str);
|
||||||
|
|
||||||
bool is_positive_num(const std::string& str, bool hex);
|
bool is_positive_num(const std::string& str, const bool hex);
|
||||||
|
|
||||||
bool endsWith(const std::string& str, const std::string& suffix);
|
bool endsWith(const std::string& str, const std::string& suffix);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user