diff options
| author | Juan Linietsky | 2015-12-12 08:27:30 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-12-12 08:27:30 -0300 |
| commit | b191e740d2867c77539e6724aa959e50c78050f9 (patch) | |
| tree | ecaa036f66d9cbfc1f0296ef331cf86064783e5a /core/array.cpp | |
| parent | a73cf7f79447480b59ac15c9461a2664ac4bc34f (diff) | |
| download | godot-b191e740d2867c77539e6724aa959e50c78050f9.tar.gz godot-b191e740d2867c77539e6724aa959e50c78050f9.tar.zst godot-b191e740d2867c77539e6724aa959e50c78050f9.zip | |
Diffstat (limited to 'core/array.cpp')
| -rw-r--r-- | core/array.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/array.cpp b/core/array.cpp index ab9f19d6a..41af460d8 100644 --- a/core/array.cpp +++ b/core/array.cpp @@ -222,6 +222,24 @@ void Array::invert(){ } +void Array::push_front(const Variant& p_value) { + + _p->array.insert(0,p_value); +} + +void Array::pop_back(){ + + if (!_p->array.empty()) + _p->array.resize( _p->array.size() -1 ); + +} +void Array::pop_front(){ + + if (!_p->array.empty()) + _p->array.remove(0); + +} + Array::Array(const Array& p_from) { |
