summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/vector.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/vector.h b/core/vector.h
index 90a9bf715b..d6453a3b83 100644
--- a/core/vector.h
+++ b/core/vector.h
@@ -149,7 +149,16 @@ public:
sort_custom<_DefaultComparator<T> >();
}
-
+ void ordered_insert(const T& p_val) {
+ int i;
+ for (i=0; i<size(); i++) {
+
+ if (p_val < operator[](i)) {
+ break;
+ };
+ };
+ insert(i, p_val);
+ }
void operator=(const Vector& p_from);
Vector(const Vector& p_from);