summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2015-03-19 23:53:54 +0000
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2015-03-24 18:46:26 +0000
commit4b3b5eba86d89e65e751b9e9b8e901a17f8e35ef (patch)
tree491ef9e63e84f03c4784c2805f40166820088fc4 /core
parentba194115bc3e450ac653191b2fc52b89417ddc28 (diff)
Use Vector for storing areas
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);