aboutsummaryrefslogtreecommitdiff
path: root/scene/resources/dynamic_font.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2017-11-25 00:07:54 -0300
committerJuan Linietsky2017-11-25 00:09:40 -0300
commitbc2e8d99e5ae0dbd69e712cc71da3033f5f30139 (patch)
treed836011e3d5873e3ceea328ea3100f3c7719ab99 /scene/resources/dynamic_font.cpp
parent7dfba3cda9f13427f9f10a6eefbec52aef62274c (diff)
downloadgodot-bc2e8d99.tar.gz
godot-bc2e8d99.tar.zst
godot-bc2e8d99.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 'scene/resources/dynamic_font.cpp')
-rw-r--r--scene/resources/dynamic_font.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index 48c6add58..a40417f24 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -125,7 +125,7 @@ Error DynamicFontAtSize::_load() {
_fontdata[font->font_path] = Vector<uint8_t>();
Vector<uint8_t> &fontdata = _fontdata[font->font_path];
fontdata.resize(len);
- f->get_buffer(fontdata.ptr(), len);
+ f->get_buffer(fontdata.ptrw(), len);
font->set_font_ptr(fontdata.ptr(), len);
f->close();
}