MCPcopy Create free account
hub / github.com/crownengine/crown / parse_bool

Function parse_bool

src/core/json/json.cpp:154–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 }
153
154 bool parse_bool(const char *json)
155 {
156 CE_ENSURE(NULL != json);
157
158 switch (*json) {
159 case 't':
160 json = next(json, 't');
161 json = next(json, 'r');
162 json = next(json, 'u');
163 next(json, 'e');
164 return true;
165
166 case 'f':
167 json = next(json, 'f');
168 json = next(json, 'a');
169 json = next(json, 'l');
170 json = next(json, 's');
171 next(json, 'e');
172 return false;
173
174 default:
175 CE_FATAL("Bad boolean");
176 return false;
177 }
178 }
179
180 void parse_string(DynamicString &str, const char *json)
181 {

Callers 15

test_jsonFunction · 0.50
test_sjsonFunction · 0.50
parse_outputFunction · 0.50
compileFunction · 0.50
parseFunction · 0.50
parse_states_compatMethod · 0.50
parse_statesMethod · 0.50
compileFunction · 0.50
compile_actorFunction · 0.50
compile_hinge_jointFunction · 0.50
parse_actorsFunction · 0.50
compile_mesh_rendererFunction · 0.50

Calls 1

nextFunction · 0.70

Tested by 2

test_jsonFunction · 0.40
test_sjsonFunction · 0.40