Xonotic
Main Page
Related Pages
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
+
Functions
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
v
w
x
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
+
Enumerator
i
m
o
p
r
s
t
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Files
Functions
Variables
Typedefs
Enumerator
Macros
Pages
bool.qh
Go to the documentation of this file.
1
#pragma once
2
3
#ifndef QCC_SUPPORT_BOOL
4
// Boolean Constants
5
const
int
true
= 1;
6
const
int
false
= 0;
7
#endif
8
9
#define boolean(value) ((value) != 0)
10
11
// get true/false value of a string with multiple different inputs
12
ERASEABLE
13
float
InterpretBoolean
(
string
input)
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
}
stof
float stof(string val,...)
ERASEABLE
#define ERASEABLE
Definition:
_all.inc:35
InterpretBoolean
ERASEABLE float InterpretBoolean(string input)
Definition:
bool.qh:13
boolean
#define boolean(value)
Definition:
bool.qh:9
lib
bool.qh
Generated on Thu Mar 17 2022 17:26:29 for Xonotic by
1.8.13