diff options
| author | Juan Linietsky | 2017-11-25 00:07:54 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-11-25 00:09:40 -0300 |
| commit | bc2e8d99e5ae0dbd69e712cc71da3033f5f30139 (patch) | |
| tree | d836011e3d5873e3ceea328ea3100f3c7719ab99 /core/array.cpp | |
| parent | 7dfba3cda9f13427f9f10a6eefbec52aef62274c (diff) | |
| download | godot-bc2e8d9.tar.gz godot-bc2e8d9.tar.zst godot-bc2e8d9.zip | |
Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,
leading to unnecesary copy on writes and reduced performance.
Diffstat (limited to '')
| -rw-r--r-- | core/array.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/array.cpp b/core/array.cpp index b7d4ae413..1ccbbae14 100644 --- a/core/array.cpp +++ b/core/array.cpp @@ -261,7 +261,7 @@ Array &Array::sort_custom(Object *p_obj, const StringName &p_function) { SortArray<Variant, _ArrayVariantSortCustom> avs; avs.compare.obj = p_obj; avs.compare.func = p_function; - avs.sort(_p->array.ptr(), _p->array.size()); + avs.sort(_p->array.ptrw(), _p->array.size()); return *this; } |
