diff Test.cpp @ 53:86d8a699dfbe

Don't object if two consecutive runs produce the same output, if neither has timestamps anyway
author Chris Cannam
date Fri, 12 Sep 2014 21:58:45 +0100
parents 4bd0cd3c60f3
children c7fd03f5ae02
line wrap: on
line diff
--- a/Test.cpp	Fri Sep 12 18:05:52 2014 +0100
+++ b/Test.cpp	Fri Sep 12 21:58:45 2014 +0100
@@ -175,6 +175,22 @@
     return true;
 }
 
+bool
+Test::containsTimestamps(const Plugin::FeatureSet &b)
+{
+    for (Plugin::FeatureSet::const_iterator i = b.begin(); i != b.end(); ++i) {
+        for (int j = 0; j < (int)i->second.size(); ++j) {
+            if (i->second[j].values.empty()) continue;
+            for (int k = 0; k < (int)i->second[j].values.size(); ++k) {
+                if (i->second[j].hasTimestamp) {
+                    return true;
+                }
+            }
+        }
+    }
+    return false;
+}
+
 void
 Test::dumpFeature(const Plugin::Feature &f, bool showValues)
 {