summaryrefslogtreecommitdiff
path: root/core/array.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/array.cpp')
-rw-r--r--core/array.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/core/array.cpp b/core/array.cpp
index ab9f19d6a0..fef0fcbb40 100644
--- a/core/array.cpp
+++ b/core/array.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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) {