1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-25 02:47:40 +00:00

argf now parses the given argument

This commit is contained in:
Zeno Rogue
2018-09-10 19:28:12 +02:00
parent dbdb1ba6dc
commit 7da2b7e9a1
4 changed files with 70 additions and 63 deletions

View File

@@ -69,7 +69,7 @@ namespace arg {
const char* argcs() { return args().c_str(); }
int argi() { return atoi(argcs()); }
unsigned arghex() { return strtoll(argcs(), NULL, 16); }
ld argf() { return atof(argcs()); }
ld argf() { return parseld(args()); }
bool argis(const string& s) { return args() == s; }
void init(int argc, char **argv) { for(int i=0; i<argc; i++) argument.push_back(argv[i]); shift(); }