From bc2e8d99e5ae0dbd69e712cc71da3033f5f30139 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 25 Nov 2017 00:07:54 -0300 Subject: Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function, leading to unnecesary copy on writes and reduced performance. --- core/string_buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/string_buffer.h') 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 &>(buffer).empty() ? short_buffer : buffer.ptr(); + return static_cast &>(buffer).empty() ? short_buffer : buffer.ptrw(); } public: -- cgit v1.2.3