From: Tim King Date: Tue, 29 Jun 2010 20:58:44 +0000 (+0000) Subject: Update to stats.h is now back into the trunk. The code should compile once again. X-Git-Tag: cvc5-1.0.0~8974 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=200a0b748085004595a948fdea7c73a5ab45bdcf;p=cvc5.git Update to stats.h is now back into the trunk. The code should compile once again. --- diff --git a/src/util/stats.h b/src/util/stats.h index 43f84fee6..8d3d4cfda 100644 --- a/src/util/stats.h +++ b/src/util/stats.h @@ -49,6 +49,7 @@ public: static void flushStatistics(std::ostream& out); static inline void registerStat(Stat* s) throw (AssertionException); + static inline void unregisterStat(Stat* s) throw (AssertionException); }; /* class StatisticsRegistry */ @@ -95,6 +96,12 @@ inline void StatisticsRegistry::registerStat(Stat* s) throw (AssertionException) d_registeredStats.insert(s); } } +inline void StatisticsRegistry::unregisterStat(Stat* s) throw (AssertionException){ + if(USE_STATISTICS){ + AlwaysAssert(d_registeredStats.find(s) != d_registeredStats.end()); + d_registeredStats.erase(s); + } +}