commit
2e02e0862f
7 changed files with 7 additions and 23 deletions
|
|
@ -261,11 +261,7 @@ public:
|
|||
mutable optional<xdata_t> xdata_;
|
||||
|
||||
bool has_xdata() const {
|
||||
#if BOOST_VERSION >= 105600
|
||||
return xdata_ != NULL;
|
||||
#else
|
||||
return xdata_;
|
||||
#endif
|
||||
return xdata_ != boost::none;
|
||||
}
|
||||
void clear_xdata();
|
||||
xdata_t& xdata() {
|
||||
|
|
|
|||
|
|
@ -707,7 +707,7 @@ namespace {
|
|||
insert_prices_in_map(price_map_t& _all_prices)
|
||||
: all_prices(_all_prices) {}
|
||||
|
||||
void operator()(datetime_t& date, const amount_t& price) {
|
||||
void operator()(const datetime_t& date, const amount_t& price) {
|
||||
all_prices.insert(price_map_t::value_type(date, price));
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -174,11 +174,7 @@ public:
|
|||
static bool use_aux_date;
|
||||
|
||||
virtual bool has_date() const {
|
||||
#if BOOST_VERSION >= 105600
|
||||
return _date != NULL;
|
||||
#else
|
||||
return _date;
|
||||
#endif
|
||||
return _date != boost::none;
|
||||
}
|
||||
|
||||
virtual date_t date() const {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ namespace {
|
|||
TRACE_DTOR(create_price_xact);
|
||||
}
|
||||
|
||||
void operator()(datetime_t& date, const amount_t& price) {
|
||||
void operator()(const datetime_t& date, const amount_t& price) {
|
||||
xact_t * xact;
|
||||
string symbol = price.commodity().symbol();
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public:
|
|||
|
||||
ptr_op_t parse(std::istream& in,
|
||||
const parse_flags_t& flags = PARSE_DEFAULT,
|
||||
const optional<string>& original_string = NULL);
|
||||
const optional<string>& original_string = boost::none);
|
||||
};
|
||||
|
||||
} // namespace ledger
|
||||
|
|
|
|||
|
|
@ -205,11 +205,7 @@ public:
|
|||
mutable optional<xdata_t> xdata_;
|
||||
|
||||
bool has_xdata() const {
|
||||
#if BOOST_VERSION >= 105600
|
||||
return xdata_ != NULL;
|
||||
#else
|
||||
return xdata_;
|
||||
#endif
|
||||
return xdata_ != boost::none;
|
||||
}
|
||||
void clear_xdata() {
|
||||
xdata_ = none;
|
||||
|
|
|
|||
|
|
@ -500,11 +500,7 @@ public:
|
|||
void stabilize(const optional<date_t>& date = none);
|
||||
|
||||
bool is_valid() const {
|
||||
#if BOOST_VERSION >= 105600
|
||||
return start != NULL;
|
||||
#else
|
||||
return start;
|
||||
#endif
|
||||
return start != boost::none;
|
||||
}
|
||||
|
||||
/** Find the current or next period containing date. Returns false if
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue