mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Refactor endsWith() to not use the STL
There's not really any reason for this function to use heap-allocated strings. So I've refactored it to not do that. I would've used SDL_strrstr(), if it existed. It does not appear to exist. But that's okay.
This commit is contained in:
@@ -26,7 +26,7 @@ bool is_number(const char* str);
|
||||
|
||||
bool is_positive_num(const char* str, const bool hex);
|
||||
|
||||
bool endsWith(const std::string& str, const std::string& suffix);
|
||||
bool endsWith(const char* str, const char* suffix);
|
||||
|
||||
#define INBOUNDS_VEC(index, vector) ((int) index >= 0 && (int) index < (int) vector.size())
|
||||
#define INBOUNDS_ARR(index, array) ((int) index >= 0 && (int) index < (int) SDL_arraysize(array))
|
||||
|
||||
Reference in New Issue
Block a user