diff src/AgentFeederPoly.h @ 187:1697457458b7 noteagent

Don't retain returned hypotheses -- to avoid having to test whether we've seen them before
author Chris Cannam
date Wed, 28 May 2014 15:16:00 +0100
parents 9b9cdfccbd14
children 462b165c8c0f
line wrap: on
line diff
--- a/src/AgentFeederPoly.h	Wed May 28 15:05:43 2014 +0100
+++ b/src/AgentFeederPoly.h	Wed May 28 15:16:00 2014 +0100
@@ -71,12 +71,13 @@
         }
     }
 
-    std::set<Hypothesis> getAcceptedHypotheses() const {
+    std::set<Hypothesis> retrieveAcceptedHypotheses() {
         std::set<Hypothesis> hs;
         for (typename Hypotheses::const_iterator i = m_state.completed.begin();
              i != m_state.completed.end(); ++i) {
             hs.insert(*i);
         }
+        m_state.completed.clear();
         return hs;
     }