From 84ead9153fe5d681276957688c5bf565bdf5b445 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 23 May 2007 00:36:26 +0000 Subject: Just a few minor corrections. --- src/numerics/commodity.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/numerics/commodity.h') diff --git a/src/numerics/commodity.h b/src/numerics/commodity.h index 5389ed46..767023e8 100644 --- a/src/numerics/commodity.h +++ b/src/numerics/commodity.h @@ -39,14 +39,11 @@ * This file contains one of the most basic types in Ledger: * commodity_t, and its annotated cousin, annotated_commodity_t. */ - #ifndef _COMMODITY_H #define _COMMODITY_H namespace ledger { -class annotated_commodity_t; - class commodity_t : public delegates_flags<>, public equality_comparable1 @@ -128,9 +125,6 @@ public: return *parent_; } - annotated_commodity_t& as_annotated(); - const annotated_commodity_t& as_annotated() const; - string base_symbol() const { return base->symbol; } @@ -297,6 +291,16 @@ public: const annotation_t& info); }; +inline annotated_commodity_t& +as_annotated_commodity(commodity_t& commodity) { + return downcast(commodity); +} +inline const annotated_commodity_t& +as_annotated_commodity(const commodity_t& commodity) { + return downcast(commodity); +} + + struct compare_amount_commodities { bool operator()(const amount_t * left, const amount_t * right) const; }; -- cgit v1.2.3