diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2015-07-27 20:37:16 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2015-07-27 20:37:16 +0100 |
commit | bcaca24de4264f89a94069701361988007e22e58 (patch) | |
tree | eee91e88c78ad7eb936272697261dbdea1ec3769 /src/times.h | |
parent | 5b31641a75c3b603d53350965ff4867ac05f77e5 (diff) | |
download | fork-ledger-bcaca24de4264f89a94069701361988007e22e58.tar.gz fork-ledger-bcaca24de4264f89a94069701361988007e22e58.tar.bz2 fork-ledger-bcaca24de4264f89a94069701361988007e22e58.zip |
Convert boost::optional objects to bool explicitly.
Fixes #417.
Diffstat (limited to 'src/times.h')
-rw-r--r-- | src/times.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/times.h b/src/times.h index 421d1462..e1a9e847 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 static_cast<bool>(start); } /** Find the current or next period containing date. Returns false if |