Ticket #47597: ledger-3.1-boost-1.58.patch

File ledger-3.1-boost-1.58.patch, 2.8 KB (added by mvgrimes, 9 years ago)
  • src/account.h

    diff --git a/src/account.h b/src/account.h
    index 7411dfc..23384db 100644
    a b public: 
    261261  mutable optional<xdata_t> xdata_;
    262262
    263263  bool has_xdata() const {
    264 #if BOOST_VERSION >= 105600
    265     return xdata_ != NULL;
    266 #else
    267     return xdata_;
    268 #endif
     264    return xdata_ != boost::none;
    269265  }
    270266  void clear_xdata();
    271267  xdata_t& xdata() {
  • src/filters.cc

    diff --git a/src/filters.cc b/src/filters.cc
    index bdc2983..a11dcdd 100644
    a b namespace { 
    707707    insert_prices_in_map(price_map_t& _all_prices)
    708708      : all_prices(_all_prices) {}
    709709
    710     void operator()(datetime_t& date, const amount_t& price) {
     710    void operator()(const datetime_t& date, const amount_t& price) {
    711711      all_prices.insert(price_map_t::value_type(date, price));
    712712    }
    713713  };
  • src/item.h

    diff --git a/src/item.h b/src/item.h
    index 767a071..8cb3c3d 100644
    a b public: 
    191191  static bool use_aux_date;
    192192
    193193  virtual bool has_date() const {
    194 #if BOOST_VERSION >= 105600
    195     return _date != NULL;
    196 #else
    197     return _date;
    198 #endif
     194    return _date != boost::none;
    199195  }
    200196
    201197  virtual date_t date() const {
  • src/iterators.cc

    diff --git a/src/iterators.cc b/src/iterators.cc
    index fd6cde6..742db43 100644
    a b namespace { 
    9696      TRACE_DTOR(create_price_xact);
    9797    }
    9898
    99     void operator()(datetime_t& date, const amount_t& price) {
     99    void operator()(const datetime_t& date, const amount_t& price) {
    100100      xact_t * xact;
    101101      string   symbol = price.commodity().symbol();
    102102
  • src/parser.h

    diff --git a/src/parser.h b/src/parser.h
    index a056493..0d9d07b 100644
    a b public: 
    118118
    119119  ptr_op_t parse(std::istream&           in,
    120120                 const parse_flags_t&    flags           = PARSE_DEFAULT,
    121                  const optional<string>& original_string = NULL);
     121                 const optional<string>& original_string = boost::none);
    122122};
    123123
    124124} // namespace ledger
  • src/post.h

    diff --git a/src/post.h b/src/post.h
    index d04be26..8070f3d 100644
    a b public: 
    205205  mutable optional<xdata_t> xdata_;
    206206
    207207  bool has_xdata() const {
    208 #if BOOST_VERSION >= 105600
    209     return xdata_ != NULL;
    210 #else
    211     return xdata_;
    212 #endif
     208    return xdata_ != boost::none;
    213209  }
    214210  void clear_xdata() {
    215211    xdata_ = none;
  • src/times.h

    diff --git a/src/times.h b/src/times.h
    index 0000758..1d8f121 100644
    a b public: 
    568568  void   stabilize(const optional<date_t>& date = none);
    569569
    570570  bool   is_valid() const {
    571 #if BOOST_VERSION >= 105600
    572     return start != NULL;
    573 #else
    574     return start;
    575 #endif
     571    return start != boost::none;
    576572  }
    577573
    578574  /** Find the current or next period containing date.  Returns false if