summaryrefslogtreecommitdiff
path: root/core/project_settings.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-11-25 00:07:54 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-11-25 00:09:40 -0300
commitbc2e8d99e5ae0dbd69e712cc71da3033f5f30139 (patch)
treed836011e3d5873e3ceea328ea3100f3c7719ab99 /core/project_settings.cpp
parent7dfba3cda9f13427f9f10a6eefbec52aef62274c (diff)
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/project_settings.cpp')
-rw-r--r--core/project_settings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index 361464ee1f..13340535b5 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -429,7 +429,7 @@ Error ProjectSettings::_load_settings_binary(const String p_path) {
uint32_t vlen = f->get_32();
Vector<uint8_t> d;
d.resize(vlen);
- f->get_buffer(d.ptr(), vlen);
+ f->get_buffer(d.ptrw(), vlen);
Variant value;
Error err = decode_variant(value, d.ptr(), d.size());
ERR_EXPLAIN("Error decoding property: " + key);