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

Method ToDouble

opt_utils/src/json.cpp:252–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250 }
251 }
252 double Value::ToDouble() const
253 {
254 if (IsNumber())
255 {
256 std::stringstream sstr(valueStr);
257 double val;
258 sstr >> val;
259 return val;
260 }
261 else
262 {
263 return 0.0;
264 }
265 }
266 bool Value::ToBool() const
267 {
268 if (IsBool())

Callers

nothing calls this directly

Calls 1

IsNumberFunction · 0.85

Tested by

no test coverage detected