add pop_back/pop_front/push_back/push_front to array, to make it according to doc, fixes #3040
This commit is contained in:
@ -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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user