Xonotic
bool.qh File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define boolean(value)   ((value) != 0)
 

Functions

ERASEABLE float InterpretBoolean (string input)
 

Variables

const int false = 0
 
const int true = 1
 

Macro Definition Documentation

◆ boolean

Function Documentation

◆ InterpretBoolean()

ERASEABLE float InterpretBoolean ( string  input)

Definition at line 13 of file bool.qh.

References boolean, and stof().

Referenced by ClientCommand_autoswitch(), LocalCommand_handlevote(), and LocalCommand_hud().

14 {
15  switch (strtolower(input))
16  {
17  case "yes":
18  case "true":
19  case "on":
20  return true;
21 
22  case "no":
23  case "false":
24  case "off":
25  return false;
26 
27  default: return boolean(stof(input));
28  }
29 }
#define boolean(value)
Definition: bool.qh:9
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ false

const int false = 0

Definition at line 6 of file bool.qh.

◆ true

const int true = 1

Definition at line 5 of file bool.qh.