summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/framework/DynamicExtension.h2
-rw-r--r--include/shard/WIRS.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/include/framework/DynamicExtension.h b/include/framework/DynamicExtension.h
index 2dcbf18..4f3a3bc 100644
--- a/include/framework/DynamicExtension.h
+++ b/include/framework/DynamicExtension.h
@@ -157,7 +157,7 @@ public:
// Merge the results together
auto result = Q::merge(query_results);
- for (size_t i=0; i<query_results.size(); i++) {
+ for (size_t i=0; i<states.size(); i++) {
Q::delete_query_state(states[i]);
}
diff --git a/include/shard/WIRS.h b/include/shard/WIRS.h
index 020df19..f3696a4 100644
--- a/include/shard/WIRS.h
+++ b/include/shard/WIRS.h
@@ -55,6 +55,11 @@ struct WIRSState {
std::vector<wirs_node<R>*> nodes;
Alias* top_level_alias;
+ WIRSState() {
+ tot_weight = 0;
+ top_level_alias = nullptr;
+ }
+
~WIRSState() {
if (top_level_alias) delete top_level_alias;
}