summaryrefslogtreecommitdiff
path: root/src/commodity.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-03 12:09:23 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-03 12:09:23 -0500
commit94b2518c4156e5a6b2be45bdbeeacf1ced0cd17f (patch)
treebed7d794e70294347d4f0eca7159a2eed5743543 /src/commodity.cc
parent46e46dd5a337c009391583a679d6172cf4f5aa42 (diff)
parentf6f8ef1ba6164622f38b91bf10e0c1a0e7e8f9e3 (diff)
downloadledger-94b2518c4156e5a6b2be45bdbeeacf1ced0cd17f.tar.gz
ledger-94b2518c4156e5a6b2be45bdbeeacf1ced0cd17f.tar.bz2
ledger-94b2518c4156e5a6b2be45bdbeeacf1ced0cd17f.zip
Merge branch 'next'
Diffstat (limited to 'src/commodity.cc')
-rw-r--r--src/commodity.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/commodity.cc b/src/commodity.cc
index d896572f..a0827e7a 100644
--- a/src/commodity.cc
+++ b/src/commodity.cc
@@ -375,7 +375,7 @@ commodity_t::check_for_updated_price(const optional<price_point_t>& point,
const optional<datetime_t>& moment,
const optional<commodity_t&>& in_terms_of)
{
- if (parent().get_quotes && ! has_flags(COMMODITY_NOMARKET)) {
+ if (pool().get_quotes && ! has_flags(COMMODITY_NOMARKET)) {
bool exceeds_leeway = true;
if (point) {
@@ -389,8 +389,8 @@ commodity_t::check_for_updated_price(const optional<price_point_t>& point,
DEBUG("commodity.download", "slip.now = " << seconds_diff);
}
- DEBUG("commodity.download", "leeway = " << parent().quote_leeway);
- if (seconds_diff < parent().quote_leeway)
+ DEBUG("commodity.download", "leeway = " << pool().quote_leeway);
+ if (seconds_diff < pool().quote_leeway)
exceeds_leeway = false;
}
@@ -398,7 +398,7 @@ commodity_t::check_for_updated_price(const optional<price_point_t>& point,
DEBUG("commodity.download",
"attempting to download a more current quote...");
if (optional<price_point_t> quote =
- parent().get_commodity_quote(*this, in_terms_of)) {
+ pool().get_commodity_quote(*this, in_terms_of)) {
if (! in_terms_of ||
(quote->price.has_commodity() &&
quote->price.commodity() == *in_terms_of))
@@ -411,7 +411,7 @@ commodity_t::check_for_updated_price(const optional<price_point_t>& point,
commodity_t::operator bool() const
{
- return this != parent().null_commodity;
+ return this != pool().null_commodity;
}
bool commodity_t::symbol_needs_quotes(const string& symbol)
@@ -568,7 +568,7 @@ void commodity_t::parse_symbol(char *& p, string& symbol)
bool commodity_t::valid() const
{
- if (symbol().empty() && this != parent().null_commodity) {
+ if (symbol().empty() && this != pool().null_commodity) {
DEBUG("ledger.validate",
"commodity_t: symbol().empty() && this != null_commodity");
return false;