diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-11-25 00:07:54 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-11-25 00:09:40 -0300 |
commit | bc2e8d99e5ae0dbd69e712cc71da3033f5f30139 (patch) | |
tree | d836011e3d5873e3ceea328ea3100f3c7719ab99 /core/string_buffer.h | |
parent | 7dfba3cda9f13427f9f10a6eefbec52aef62274c (diff) | |
download | redot-engine-bc2e8d99e5ae0dbd69e712cc71da3033f5f30139.tar.gz |
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 'core/string_buffer.h')
-rw-r--r-- | core/string_buffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/string_buffer.h b/core/string_buffer.h index 3f36249148..b6ccd4af20 100644 --- a/core/string_buffer.h +++ b/core/string_buffer.h @@ -40,7 +40,7 @@ class StringBuffer { int string_length = 0; _FORCE_INLINE_ CharType *current_buffer_ptr() { - return static_cast<Vector<CharType> &>(buffer).empty() ? short_buffer : buffer.ptr(); + return static_cast<Vector<CharType> &>(buffer).empty() ? short_buffer : buffer.ptrw(); } public: |