summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-01 08:48:42 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-01 09:24:28 (GMT)
commit2812bddd81f8a1b804c7460f4e14cd0aa393d129 (patch)
treed46294f35150c4f0f43deaf2d31fceaf945ae715 /3rdParty/CppUnit/cppunit/tools/Algorithm.h
downloadswift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.zip
swift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.tar.bz2
Import.
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