MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / toFormattedDouble

Method toFormattedDouble

source/core/StarFormattedJson.cpp:391–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391String FormattedJson::toFormattedDouble() const {
392 if (!isType(Json::Type::Float))
393 throw JsonException::format("Cannot call toFormattedDouble on Json type {}, must be Float", typeName());
394 if (m_formatting.isValid())
395 return *m_formatting;
396 return toJson().repr();
397}
398
399String FormattedJson::toFormattedInt() const {
400 if (!isType(Json::Type::Int))

Callers 1

toJsonStreamMethod · 0.80

Calls 3

isValidMethod · 0.80
formatFunction · 0.70
reprMethod · 0.45

Tested by

no test coverage detected