MCPcopy Create free account
hub / github.com/ceph/ceph / add_value

Method add_value

src/common/JSONFormatter.cc:170–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void JSONFormatter::add_value(std::string_view name, double val) {
171 CachedStackStringStream css;
172 if (!std::isfinite(val) || std::isnan(val)) {
173 *css << "null";
174 } else {
175 css->precision(std::numeric_limits<double>::max_digits10);
176 *css << val;
177 }
178 add_value(name, css->strv(), false);
179}
180
181template <class T>
182void JSONFormatter::add_value(std::string_view name, T val)

Callers

nothing calls this directly

Calls 1

strvMethod · 0.45

Tested by

no test coverage detected