MCPcopy Create free account
hub / github.com/catboost/catboost / GetDouble

Method GetDouble

library/cpp/json/ordered_maps/json_value_ordered.cpp:437–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435 }
436
437 double TJsonValue::GetDouble() const {
438 if (!IsDouble()) {
439 return 0.0;
440 }
441 switch (Type) {
442 case JSON_DOUBLE:
443 return Value.Double;
444 case JSON_INTEGER:
445 return Value.Integer;
446 case JSON_UINTEGER:
447 return Value.UInteger;
448 default:
449 Y_ASSERT(false && "Unexpected type.");
450 return 0.0;
451 }
452 }
453
454 const TString& TJsonValue::GetString() const {
455 return Type != JSON_STRING ? Singleton<TDefaultsHolder>()->String : Value.String;

Callers 6

GetDoubleFunction · 0.45
TJsonValueMethod · 0.45
operator==Method · 0.45
WriteJsonValueMethod · 0.45
Y_UNIT_TESTFunction · 0.45
Y_UNIT_TESTFunction · 0.45

Calls 1

GetDoubleFunction · 0.70

Tested by

no test coverage detected