summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/CppUnit/cppunit/tools/Algorithm.h')
-rw-r--r--3rdParty/CppUnit/cppunit/tools/Algorithm.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/3rdParty/CppUnit/cppunit/tools/Algorithm.h b/3rdParty/CppUnit/cppunit/tools/Algorithm.h
new file mode 100644
index 0000000..e5746a2
--- /dev/null
+++ b/3rdParty/CppUnit/cppunit/tools/Algorithm.h
@@ -0,0 +1,23 @@
+#ifndef CPPUNIT_TOOLS_ALGORITHM_H_INCLUDED
+#define CPPUNIT_TOOLS_ALGORITHM_H_INCLUDED
+
+#include <cppunit/Portability.h>
+
+CPPUNIT_NS_BEGIN
+
+template<class SequenceType, class ValueType>
+void
+removeFromSequence( SequenceType &sequence,
+ const ValueType &valueToRemove )
+{
+ for ( unsigned int index =0; index < sequence.size(); ++index )
+ {
+ if ( sequence[ index ] == valueToRemove )
+ sequence.erase( sequence.begin() + index );
+ }
+}
+
+CPPUNIT_NS_END
+
+
+#endif // CPPUNIT_TOOLS_ALGORITHM_H_INCLUDED