Update to stats.h is now back into the trunk. The code should compile once again.
authorTim King <taking@cs.nyu.edu>
Tue, 29 Jun 2010 20:58:44 +0000 (20:58 +0000)
committerTim King <taking@cs.nyu.edu>
Tue, 29 Jun 2010 20:58:44 +0000 (20:58 +0000)
src/util/stats.h

index 43f84fee6690eb3aa1d971ff841b48679a3864ea..8d3d4cfdaae0f62fcf8e5e6ecc509b20a2878e17 100644 (file)
@@ -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);
+  }
+}