summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-07 19:36:47 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-07 19:36:51 -0400
commit4a28e1765caff97b4c89884b6511a60d009211d8 (patch)
treec8c733b4c30250b912f9cd804338a065e99474b1 /src
parent19a59079fa1945d56605539dcc75e79cf9549fb2 (diff)
downloadfork-ledger-4a28e1765caff97b4c89884b6511a60d009211d8.tar.gz
fork-ledger-4a28e1765caff97b4c89884b6511a60d009211d8.tar.bz2
fork-ledger-4a28e1765caff97b4c89884b6511a60d009211d8.zip
Fixed some #include ordering issues.
Diffstat (limited to 'src')
-rw-r--r--src/amount.cc10
-rw-r--r--src/amount.h14
-rw-r--r--src/balance.h2
-rw-r--r--src/commodity.h2
-rw-r--r--src/flags.h2
-rw-r--r--src/hooks.h2
-rw-r--r--src/report.h2
-rw-r--r--src/utils.h5
8 files changed, 18 insertions, 21 deletions
diff --git a/src/amount.cc b/src/amount.cc
index 829b31ef..13630eb2 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -30,6 +30,7 @@
*/
#include "amount.h"
+#include "commodity.h"
namespace ledger {
@@ -661,6 +662,15 @@ bool amount_t::fits_in_long() const
return mpfr_fits_slong_p(tempf, GMP_RNDN);
}
+commodity_t& amount_t::commodity() const
+{
+ return has_commodity() ? *commodity_ : *current_pool->null_commodity;
+}
+
+bool amount_t::has_commodity() const
+{
+ return commodity_ && commodity_ != commodity_->parent().null_commodity;
+}
void amount_t::annotate(const annotation_t& details)
{
diff --git a/src/amount.h b/src/amount.h
index c19e5b96..8042dd6b 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -707,18 +707,4 @@ inline std::istream& operator>>(std::istream& in, amount_t& amt) {
} // namespace ledger
-#include "commodity.h"
-
-namespace ledger {
-
-inline commodity_t& amount_t::commodity() const {
- return has_commodity() ? *commodity_ : *current_pool->null_commodity;
-}
-
-inline bool amount_t::has_commodity() const {
- return commodity_ && commodity_ != commodity_->parent().null_commodity;
-}
-
-} // namespace ledger
-
#endif // _AMOUNT_H
diff --git a/src/balance.h b/src/balance.h
index a0231717..2c4e4993 100644
--- a/src/balance.h
+++ b/src/balance.h
@@ -49,7 +49,7 @@
#ifndef _BALANCE_H
#define _BALANCE_H
-#include "amount.h"
+#include "commodity.h"
namespace ledger {
diff --git a/src/commodity.h b/src/commodity.h
index 9da2bc92..bff8c1c4 100644
--- a/src/commodity.h
+++ b/src/commodity.h
@@ -47,6 +47,8 @@
#ifndef _COMMODITY_H
#define _COMMODITY_H
+#include "amount.h"
+
namespace ledger {
class keep_details_t;
diff --git a/src/flags.h b/src/flags.h
index 215de6b2..754f0871 100644
--- a/src/flags.h
+++ b/src/flags.h
@@ -46,6 +46,8 @@
#ifndef _FLAGS_H
#define _FLAGS_H
+#include "utils.h"
+
/**
* @brief Brief
*
diff --git a/src/hooks.h b/src/hooks.h
index 79c25e53..7a80f3be 100644
--- a/src/hooks.h
+++ b/src/hooks.h
@@ -46,6 +46,8 @@
#ifndef _HOOKS_H
#define _HOOKS_H
+#include "utils.h"
+
/**
* @brief Brief
*
diff --git a/src/report.h b/src/report.h
index 63a3d81f..6e2e77fb 100644
--- a/src/report.h
+++ b/src/report.h
@@ -164,7 +164,7 @@ public:
HANDLED(base));
}
- option_t<report_t> * report_t::lookup_option(const char * p);
+ option_t<report_t> * lookup_option(const char * p);
virtual expr_t::ptr_op_t lookup(const string& name);
diff --git a/src/utils.h b/src/utils.h
index ddc83882..d4011442 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -44,11 +44,6 @@
#ifndef _UTILS_H
#define _UTILS_H
-#if defined(DEBUG_MODE)
-#define BOOST_MULTI_INDEX_ENABLE_SAFE_MODE 1
-#define BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING 1
-#endif
-
#include <system.hh>
/**