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

Method GetDouble

library/cpp/json/writer/json_value.cpp:394–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392 }
393
394 double TJsonValue::GetDouble() const {
395 if (!IsDouble()) {
396 return 0.0;
397 }
398 switch (Type) {
399 case JSON_DOUBLE:
400 return Value.Double;
401 case JSON_INTEGER:
402 return Value.Integer;
403 case JSON_UINTEGER:
404 return Value.UInteger;
405 default:
406 Y_ASSERT(false && "Unexpected type.");
407 return 0.0;
408 }
409 }
410
411 const TString& TJsonValue::GetString() const {
412 return Type != JSON_STRING ? Singleton<TDefaultsHolder>()->String : Value.String;

Callers 6

WriteJsonValueFunction · 0.45
GetDoubleFunction · 0.45
WriteJsonValueMethod · 0.45
operator==Method · 0.45
Y_UNIT_TESTFunction · 0.45
MergeSubprocessReportMethod · 0.45

Calls 1

GetDoubleFunction · 0.70

Tested by

no test coverage detected