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 373 of file C4MainMenu.cpp.

Referenced by C4MainMenu::ActivateSavegame().

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

Here is the caller graph for this function: