@@ -29,9 +29,9 @@ inline nlohmann::json parseWrapper(std::istream &is)
29
29
30
30
// TJSONTree methods
31
31
32
- TJSONTree::TJSONTree () : root(this ){};
32
+ TJSONTree::TJSONTree () : root(this ) {};
33
33
34
- TJSONTree::TJSONTree (std::istream &is) : root(this , is){};
34
+ TJSONTree::TJSONTree (std::istream &is) : root(this , is) {};
35
35
36
36
TJSONTree::~TJSONTree ()
37
37
{
@@ -248,7 +248,11 @@ std::string TJSONTree::Node::val() const
248
248
case nlohmann::json::value_t ::boolean: return node->get ().get <bool >() ? " true" : " false" ;
249
249
case nlohmann::json::value_t ::number_integer: return std::to_string (node->get ().get <int >());
250
250
case nlohmann::json::value_t ::number_unsigned: return std::to_string (node->get ().get <unsigned int >());
251
- case nlohmann::json::value_t ::number_float: return std::to_string (node->get ().get <double >());
251
+ case nlohmann::json::value_t ::number_float: {
252
+ std::stringstream ss;
253
+ ss << node->get ().get <double >();
254
+ return ss.str ();
255
+ }
252
256
default :
253
257
throw std::runtime_error (" node \" " + node->key () + " \" : implicit string conversion for type " +
254
258
node->get ().type_name () + " not supported!" );
@@ -321,9 +325,12 @@ using const_json_iterator = nlohmann::basic_json<>::const_iterator;
321
325
template <class Nd , class NdType , class json_it >
322
326
class TJSONTree ::Node::ChildItImpl final : public RooFit::Detail::JSONNode::child_iterator_t <Nd>::Impl {
323
327
public:
324
- enum class POS { BEGIN, END };
328
+ enum class POS {
329
+ BEGIN,
330
+ END
331
+ };
325
332
ChildItImpl (NdType &n, POS p)
326
- : node(n), iter(p == POS::BEGIN ? n.get_node().get().begin() : n.get_node().get().end()){};
333
+ : node(n), iter(p == POS::BEGIN ? n.get_node().get().begin() : n.get_node().get().end()) {};
327
334
ChildItImpl (NdType &n, json_it it) : node(n), iter(it) {}
328
335
ChildItImpl (const ChildItImpl &other) : node(other.node), iter(other.iter) {}
329
336
using child_iterator = RooFit::Detail::JSONNode::child_iterator_t <Nd>;
0 commit comments