From 4ed6599579ebd1b74050df5362591d3acfca9091 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 27 Aug 2014 11:56:07 -0500 Subject: Revert "fix "type 'char' cannot be used prior to '::'"" This reverts commit 38557ee63273dcdef22b136c5f424802c7ff6e03. --- src/ptree.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ptree.cc b/src/ptree.cc index fa6a1db9..6609aed9 100644 --- a/src/ptree.cc +++ b/src/ptree.cc @@ -80,7 +80,7 @@ void format_ptree::flush() switch (format) { case FORMAT_XML: - auto indented = property_tree::xml_writer_make_settings (' ', 2); + property_tree::xml_writer_settings indented(' ', 2); property_tree::write_xml(out, pt, indented); out << std::endl; break; -- cgit v1.2.3 From 948f5fea2818df2e4793557505914bbc859fc193 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 27 Aug 2014 11:56:14 -0500 Subject: Revert "fix "no viable conversion from ... to 'bool'"" This reverts commit df9ae3ab9b37fde803f26c6bc4eaadfd67fc1d07. --- src/account.h | 2 +- src/item.h | 2 +- src/post.h | 2 +- src/times.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/account.h b/src/account.h index 4a4041b7..d1377c39 100644 --- a/src/account.h +++ b/src/account.h @@ -261,7 +261,7 @@ public: mutable optional xdata_; bool has_xdata() const { - return xdata_ != NULL; + return xdata_; } void clear_xdata(); xdata_t& xdata() { diff --git a/src/item.h b/src/item.h index d194ac07..beb32a04 100644 --- a/src/item.h +++ b/src/item.h @@ -191,7 +191,7 @@ public: static bool use_aux_date; virtual bool has_date() const { - return _date != NULL; + return _date; } virtual date_t date() const { diff --git a/src/post.h b/src/post.h index c4fc3827..c2f77b32 100644 --- a/src/post.h +++ b/src/post.h @@ -205,7 +205,7 @@ public: mutable optional xdata_; bool has_xdata() const { - return xdata_ != NULL; + return xdata_; } void clear_xdata() { xdata_ = none; diff --git a/src/times.h b/src/times.h index d2f7bb19..2a5b9277 100644 --- a/src/times.h +++ b/src/times.h @@ -568,7 +568,7 @@ public: void stabilize(const optional& date = none); bool is_valid() const { - return start != NULL; + return start; } /** Find the current or next period containing date. Returns false if -- cgit v1.2.3 From d5592ea1e325131d4a7abf5e98f67fcb5cf22287 Mon Sep 17 00:00:00 2001 From: Joe Gallo Date: Thu, 28 Aug 2014 11:04:55 -0400 Subject: #if guards for boost 1.56 compatibility --- src/account.h | 4 ++++ src/item.h | 4 ++++ src/post.h | 4 ++++ src/ptree.cc | 5 +++++ src/times.h | 4 ++++ 5 files changed, 21 insertions(+) (limited to 'src') diff --git a/src/account.h b/src/account.h index d1377c39..7411dfc2 100644 --- a/src/account.h +++ b/src/account.h @@ -261,7 +261,11 @@ public: mutable optional xdata_; bool has_xdata() const { +#if BOOST_VERSION >= 105600 + return xdata_ != NULL; +#else return xdata_; +#endif } void clear_xdata(); xdata_t& xdata() { diff --git a/src/item.h b/src/item.h index beb32a04..767a0715 100644 --- a/src/item.h +++ b/src/item.h @@ -191,7 +191,11 @@ public: static bool use_aux_date; virtual bool has_date() const { +#if BOOST_VERSION >= 105600 + return _date != NULL; +#else return _date; +#endif } virtual date_t date() const { diff --git a/src/post.h b/src/post.h index c2f77b32..d04be266 100644 --- a/src/post.h +++ b/src/post.h @@ -205,7 +205,11 @@ public: mutable optional xdata_; bool has_xdata() const { +#if BOOST_VERSION >= 105600 + return xdata_ != NULL; +#else return xdata_; +#endif } void clear_xdata() { xdata_ = none; diff --git a/src/ptree.cc b/src/ptree.cc index 6609aed9..3fc9ace6 100644 --- a/src/ptree.cc +++ b/src/ptree.cc @@ -80,7 +80,12 @@ void format_ptree::flush() switch (format) { case FORMAT_XML: +#if BOOST_VERSION >= 105600 + auto indented = property_tree::xml_writer_make_settings (' ', 2); +#else property_tree::xml_writer_settings indented(' ', 2); +#endif + property_tree::write_xml(out, pt, indented); out << std::endl; break; diff --git a/src/times.h b/src/times.h index 2a5b9277..00007580 100644 --- a/src/times.h +++ b/src/times.h @@ -568,7 +568,11 @@ public: void stabilize(const optional& date = none); bool is_valid() const { +#if BOOST_VERSION >= 105600 + return start != NULL; +#else return start; +#endif } /** Find the current or next period containing date. Returns false if -- cgit v1.2.3