Fixed some #include ordering issues.

This commit is contained in:
John Wiegley 2009-02-07 19:36:47 -04:00
parent 19a59079fa
commit 4a28e1765c
8 changed files with 18 additions and 21 deletions

View file

@ -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)
{

View file

@ -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

View file

@ -49,7 +49,7 @@
#ifndef _BALANCE_H
#define _BALANCE_H
#include "amount.h"
#include "commodity.h"
namespace ledger {

View file

@ -47,6 +47,8 @@
#ifndef _COMMODITY_H
#define _COMMODITY_H
#include "amount.h"
namespace ledger {
class keep_details_t;

View file

@ -46,6 +46,8 @@
#ifndef _FLAGS_H
#define _FLAGS_H
#include "utils.h"
/**
* @brief Brief
*

View file

@ -46,6 +46,8 @@
#ifndef _HOOKS_H
#define _HOOKS_H
#include "utils.h"
/**
* @brief Brief
*

View file

@ -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);

View file

@ -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>
/**