Add fallback parameter to UtilityClass::Int()

If necessary, the caller can provide a fallback to be returned in case
the input given isn't a valid integer, instead of having to duplicate
the is_number() check.
This commit is contained in:
Misa
2020-08-06 21:56:35 -07:00
committed by Ethan Lee
parent 78e87effe7
commit d1938a151f
2 changed files with 3 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ public:
static std::string String(int _v);
static int Int(const char* str);
static int Int(const char* str, int fallback = 0);
static std::string GCString(std::vector<SDL_GameControllerButton> buttons);