summaryrefslogtreecommitdiff
path: root/src/history.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-05 05:02:45 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-05 05:03:53 -0600
commiteabd5c6a0c6796547a91cf6e642090cdb298f4da (patch)
tree4dce44d1b8cb7ba99ae9a87302bb0f45c2496220 /src/history.h
parent5abbf445833f985f2aa22bde57d47cd9f83d0c92 (diff)
downloadfork-ledger-eabd5c6a0c6796547a91cf6e642090cdb298f4da.tar.gz
fork-ledger-eabd5c6a0c6796547a91cf6e642090cdb298f4da.tar.bz2
fork-ledger-eabd5c6a0c6796547a91cf6e642090cdb298f4da.zip
Create a FGraph each time a lookup is done
Diffstat (limited to 'src/history.h')
-rw-r--r--src/history.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/history.h b/src/history.h
index 6430202b..fc984c1b 100644
--- a/src/history.h
+++ b/src/history.h
@@ -98,11 +98,13 @@ public:
if (*last_oldest)
DEBUG("history.find", " last_oldest = " << **last_oldest);
+#if 0
if (*last_reftime && *reftime == **last_reftime &&
*oldest == *last_oldest) {
DEBUG("history.find", " using previous reftime");
return get(weight, e) != std::numeric_limits<std::size_t>::max();
}
+#endif
const price_map_t& prices(get(ratios, e));
if (prices.empty()) {
@@ -189,9 +191,6 @@ public:
PriceRatioMap> > FGraph;
typedef property_map<FGraph, vertex_name_t>::type FNameMap;
- FGraph fg;
- FNameMap namemap;
-
// jww (2012-03-05): Prevents threading
mutable datetime_t reftime;
mutable optional<datetime_t> last_reftime;
@@ -201,12 +200,7 @@ public:
commodity_history_t()
: indexmap(get(vertex_index, price_graph)),
pricemap(get(edge_price_point, price_graph)),
- ratiomap(get(edge_price_ratio, price_graph)),
- fg(price_graph,
- recent_edge_weight<EdgeWeightMap, PricePointMap, PriceRatioMap>
- (get(edge_weight, price_graph), pricemap, ratiomap,
- &reftime, &last_reftime, &oldest, &last_oldest)),
- namemap(get(vertex_name, fg)) {}
+ ratiomap(get(edge_price_ratio, price_graph)) {}
void add_commodity(commodity_t& comm);