diff options
Diffstat (limited to 'include/shard/WIRS.h')
| -rw-r--r-- | include/shard/WIRS.h | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |