OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4MainMenu.cpp File Reference
Include dependency graph for C4MainMenu.cpp:

Go to the source code of this file.

Functions

bool LooksLikeInteger (const char *szInt)
 

Function Documentation

bool LooksLikeInteger ( const char *  szInt)

Definition at line 374 of file C4MainMenu.cpp.

Referenced by C4MainMenu::ActivateSavegame().

375 {
376  // safety
377  if (!szInt) return false;
378  // check sign
379  if (*szInt == '+' || *szInt == '-') ++szInt;
380  // check int32_t length
381  if (!*szInt) return false;
382  // must contain only digits now
383  char c;
384  while ((c = *(szInt++))) if (!Inside<char>(c, '0', '9')) return false;
385  // it's an int32_t
386  return true;
387 }

Here is the caller graph for this function: