UtilityClass: add a seconds() helper
This is intended to replace all those ugly magic frame numbers with ever so slightly less ugly magic second numbers. Basically, instead of saying: 150 /* 5 seconds */ we can now say seconds(5)
This commit is contained in:
parent
3f3ea6eac7
commit
6befae4eef
|
@ -55,6 +55,11 @@ const char *GCChar(SDL_GameControllerButton button)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int seconds(const int s)
|
||||
{
|
||||
return s * 30;
|
||||
}
|
||||
|
||||
int ss_toi( std::string _s )
|
||||
{
|
||||
std::istringstream i(_s);
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
int seconds(const int s);
|
||||
|
||||
int ss_toi(std::string _s);
|
||||
|
||||
std::vector<std::string> split(const std::string &s, char delim, std::vector<std::string> &elems);
|
||||
|
|
Loading…
Reference in New Issue