Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 800536
Collapse All | Expand All

(-)gmsh-4.8.4-source/Common/picojson.h (-9 / +9 lines)
Lines 186-193 Link Here
186
private:
186
private:
187
  template <typename T> value(const T *); // intentionally defined to block implicit conversion of pointer to bool
187
  template <typename T> value(const T *); // intentionally defined to block implicit conversion of pointer to bool
188
  template <typename Iter> static void _indent(Iter os, int indent);
188
  template <typename Iter> static void _indent(Iter os, int indent);
189
  template <typename Iter> void _serialize(Iter os, int indent) const;
189
  template <typename Iter> void serialize_(Iter os, int indent) const;
190
  std::string _serialize(int indent) const;
190
  std::string serialize_(int indent) const;
191
  void clear();
191
  void clear();
192
};
192
};
193
193
Lines 549-559 Link Here
549
}
549
}
550
550
551
template <typename Iter> void value::serialize(Iter oi, bool prettify) const {
551
template <typename Iter> void value::serialize(Iter oi, bool prettify) const {
552
  return _serialize(oi, prettify ? 0 : -1);
552
  return serialize_(oi, prettify ? 0 : -1);
553
}
553
}
554
554
555
inline std::string value::serialize(bool prettify) const {
555
inline std::string value::serialize(bool prettify) const {
556
  return _serialize(prettify ? 0 : -1);
556
  return serialize_(prettify ? 0 : -1);
557
}
557
}
558
558
559
template <typename Iter> void value::_indent(Iter oi, int indent) {
559
template <typename Iter> void value::_indent(Iter oi, int indent) {
Lines 563-569 Link Here
563
  }
563
  }
564
}
564
}
565
565
566
template <typename Iter> void value::_serialize(Iter oi, int indent) const {
566
template <typename Iter> void value::serialize_(Iter oi, int indent) const {
567
  switch (type_) {
567
  switch (type_) {
568
  case string_type:
568
  case string_type:
569
    serialize_str(*u_.string_, oi);
569
    serialize_str(*u_.string_, oi);
Lines 580-586 Link Here
580
      if (indent != -1) {
580
      if (indent != -1) {
581
        _indent(oi, indent);
581
        _indent(oi, indent);
582
      }
582
      }
583
      i->_serialize(oi, indent);
583
      i->serialize_(oi, indent);
584
    }
584
    }
585
    if (indent != -1) {
585
    if (indent != -1) {
586
      --indent;
586
      --indent;
Lines 608-614 Link Here
608
      if (indent != -1) {
608
      if (indent != -1) {
609
        *oi++ = ' ';
609
        *oi++ = ' ';
610
      }
610
      }
611
      i->second._serialize(oi, indent);
611
      i->second.serialize_(oi, indent);
612
    }
612
    }
613
    if (indent != -1) {
613
    if (indent != -1) {
614
      --indent;
614
      --indent;
Lines 628-636 Link Here
628
  }
628
  }
629
}
629
}
630
630
631
inline std::string value::_serialize(int indent) const {
631
inline std::string value::serialize_(int indent) const {
632
  std::string s;
632
  std::string s;
633
  _serialize(std::back_inserter(s), indent);
633
  serialize_(std::back_inserter(s), indent);
634
  return s;
634
  return s;
635
}
635
}
636
636

Return to bug 800536