MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / ToInt

Method ToInt

opt_utils/src/json.cpp:224–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222 }
223 }
224 int Value::ToInt() const
225 {
226 if (IsNumber())
227 {
228 std::stringstream sstr(valueStr);
229 int val;
230 sstr >> val;
231 return val;
232 }
233 else
234 {
235 return 0;
236 }
237 }
238 float Value::ToFloat() const
239 {
240 if (IsNumber())

Callers

nothing calls this directly

Calls 1

IsNumberFunction · 0.85

Tested by

no test coverage detected