diff options
-rwxr-xr-x | acprep | 3 | ||||
-rw-r--r-- | commodity.h | 2 | ||||
-rw-r--r-- | test/numerics/t_amount.cc | 4 |
3 files changed, 6 insertions, 3 deletions
@@ -26,7 +26,8 @@ cat configure.tmpl | \ autoreconf --force --install -INCDIRS="-I/usr/local/include -I/opt/local/include" +INCDIRS="-isystem /usr/local/include" +INCDIRS="$INCDIRS -isystem /opt/local/include" INCDIRS="$INCDIRS -isystem /usr/local/include/boost-1_35" LIBDIRS="-L/usr/local/lib -L/opt/local/lib" diff --git a/commodity.h b/commodity.h index 6f837942..94aa6b08 100644 --- a/commodity.h +++ b/commodity.h @@ -53,6 +53,8 @@ class commodity_t public: class base_t : public noncopyable, public supports_flags<> { + base_t(); + public: typedef std::map<const datetime_t, amount_t> history_map; typedef std::pair<const datetime_t, amount_t> history_pair; diff --git a/test/numerics/t_amount.cc b/test/numerics/t_amount.cc index 3fb6b0ee..69d97af3 100644 --- a/test/numerics/t_amount.cc +++ b/test/numerics/t_amount.cc @@ -1379,8 +1379,8 @@ void AmountTestCase::testCommodityForZero() { amount_t x1(internalAmount("$0.000000000000000000001")); - assertFalse(x1); - assertTrue(x1.is_zero()); + assertTrue(x1); // an internal amount never betrays its precision + assertFalse(x1.is_zero()); assertFalse(x1.is_realzero()); assertValid(x1); |