summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2015-05-11 09:42:20 -0500
committerJohn Wiegley <johnw@newartisans.com>2015-05-11 09:42:20 -0500
commit2e02e0862f1029cf72a8713643dcb7892598e5fa (patch)
tree1d43be6a3bba7b3c5f631ebf09ac48d6af9cb484 /src
parentc586e1e494487c43cf6da886739f69bb91a7e15b (diff)
parent68c9d649caa2c7c7f222613efe86576c379a5a7a (diff)
downloadfork-ledger-2e02e0862f1029cf72a8713643dcb7892598e5fa.tar.gz
fork-ledger-2e02e0862f1029cf72a8713643dcb7892598e5fa.tar.bz2
fork-ledger-2e02e0862f1029cf72a8713643dcb7892598e5fa.zip
Merge pull request #417 from kljohann/boost
build fixes for boost 1.58
Diffstat (limited to 'src')
-rw-r--r--src/account.h6
-rw-r--r--src/filters.cc2
-rw-r--r--src/item.h6
-rw-r--r--src/iterators.cc2
-rw-r--r--src/parser.h2
-rw-r--r--src/post.h6
-rw-r--r--src/times.h6
7 files changed, 7 insertions, 23 deletions
diff --git a/src/account.h b/src/account.h
index 7fae93e1..8d0fb1db 100644
--- a/src/account.h
+++ b/src/account.h
@@ -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() {
diff --git a/src/filters.cc b/src/filters.cc
index 2f97a0e5..b6530c04 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -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));
}
};
diff --git a/src/item.h b/src/item.h
index ba812175..2c349bdc 100644
--- a/src/item.h
+++ b/src/item.h
@@ -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 {
diff --git a/src/iterators.cc b/src/iterators.cc
index 21bec5d9..0225e210 100644
--- a/src/iterators.cc
+++ b/src/iterators.cc
@@ -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();
diff --git a/src/parser.h b/src/parser.h
index e46fc719..25c4a7e3 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -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
diff --git a/src/post.h b/src/post.h
index 0fb45e90..3fa67e56 100644
--- a/src/post.h
+++ b/src/post.h
@@ -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;
diff --git a/src/times.h b/src/times.h
index 421d1462..cc980858 100644
--- a/src/times.h
+++ b/src/times.h
@@ -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