diff options
| author | Fabio Alessandrelli | 2015-03-19 23:53:54 +0000 |
|---|---|---|
| committer | Fabio Alessandrelli | 2015-03-24 18:46:26 +0000 |
| commit | 4b3b5eba86d89e65e751b9e9b8e901a17f8e35ef (patch) | |
| tree | 491ef9e63e84f03c4784c2805f40166820088fc4 /core | |
| parent | ba194115bc3e450ac653191b2fc52b89417ddc28 (diff) | |
| download | godot-4b3b5eba86d89e65e751b9e9b8e901a17f8e35ef.tar.gz godot-4b3b5eba86d89e65e751b9e9b8e901a17f8e35ef.tar.zst godot-4b3b5eba86d89e65e751b9e9b8e901a17f8e35ef.zip | |
Diffstat (limited to 'core')
| -rw-r--r-- | core/vector.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/vector.h b/core/vector.h index 90a9bf715..d6453a3b8 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); |
