diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-02 17:05:51 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-02 17:05:51 -0500 |
commit | e663a13502b8813a28b8aebbc611fbc040d4246b (patch) | |
tree | aece620f1644c495bd024f6f32409bfb6bf962ae /src/commodity.cc | |
parent | dea9530cb7d65486143b866b60d9bd1e4914aa56 (diff) | |
download | fork-ledger-e663a13502b8813a28b8aebbc611fbc040d4246b.tar.gz fork-ledger-e663a13502b8813a28b8aebbc611fbc040d4246b.tar.bz2 fork-ledger-e663a13502b8813a28b8aebbc611fbc040d4246b.zip |
Changed protection level of many parts of commodity_t
Diffstat (limited to 'src/commodity.cc')
-rw-r--r-- | src/commodity.cc | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/src/commodity.cc b/src/commodity.cc index 26038a0b..d896572f 100644 --- a/src/commodity.cc +++ b/src/commodity.cc @@ -38,12 +38,12 @@ namespace ledger { -bool commodity_t::base_t::european_by_default = false; +bool commodity_t::european_by_default = false; -void commodity_t::base_t::history_t::add_price(commodity_t& source, - const datetime_t& date, - const amount_t& price, - const bool reflexive) +void commodity_t::history_t::add_price(commodity_t& source, + const datetime_t& date, + const amount_t& price, + const bool reflexive) { DEBUG("commodity.prices.add", "add_price to " << source << (reflexive ? " (secondary)" : " (primary)") @@ -69,7 +69,7 @@ void commodity_t::base_t::history_t::add_price(commodity_t& source, } } -bool commodity_t::base_t::history_t::remove_price(const datetime_t& date) +bool commodity_t::history_t::remove_price(const datetime_t& date) { DEBUG("commodity.prices.add", "remove_price: " << date); @@ -79,7 +79,7 @@ bool commodity_t::base_t::history_t::remove_price(const datetime_t& date) return false; } -void commodity_t::base_t::varied_history_t:: +void commodity_t::varied_history_t:: add_price(commodity_t& source, const datetime_t& date, const amount_t& price, @@ -99,9 +99,8 @@ void commodity_t::base_t::varied_history_t:: hist->add_price(source, date, price, reflexive); } -bool commodity_t::base_t::varied_history_t:: - remove_price(const datetime_t& date, - commodity_t& comm) +bool commodity_t::varied_history_t::remove_price(const datetime_t& date, + commodity_t& comm) { DEBUG("commodity.prices.add", "varied_remove_price: " << date << ", " << comm); @@ -111,13 +110,12 @@ bool commodity_t::base_t::varied_history_t:: } optional<price_point_t> - commodity_t::base_t::history_t:: - find_price(const optional<datetime_t>& moment, - const optional<datetime_t>& oldest +commodity_t::history_t::find_price(const optional<datetime_t>& moment, + const optional<datetime_t>& oldest #if defined(DEBUG_ON) - , const int indent + , const int indent #endif - ) const + ) const { price_point_t point; bool found = false; @@ -222,15 +220,14 @@ optional<price_point_t> } optional<price_point_t> - commodity_t::base_t::varied_history_t:: - find_price(const commodity_t& source, - const optional<commodity_t&>& commodity, - const optional<datetime_t>& moment, - const optional<datetime_t>& oldest +commodity_t::varied_history_t::find_price(const commodity_t& source, + const optional<commodity_t&>& commodity, + const optional<datetime_t>& moment, + const optional<datetime_t>& oldest #if defined(DEBUG_ON) - , const int indent + , const int indent #endif - ) const + ) const { optional<price_point_t> point; optional<datetime_t> limit = oldest; @@ -354,9 +351,8 @@ optional<price_point_t> return none; } -optional<commodity_t::base_t::history_t&> - commodity_t::base_t::varied_history_t:: - history(const optional<commodity_t&>& commodity) +optional<commodity_t::history_t&> +commodity_t::varied_history_t::history(const optional<commodity_t&>& commodity) { commodity_t * comm = NULL; if (! commodity) { |