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 /platform/javascript/export | |
parent | 7dfba3cda9f13427f9f10a6eefbec52aef62274c (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 'platform/javascript/export')
-rw-r--r-- | platform/javascript/export/export.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index 05b0fb3fbc..775e9c7ee0 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -214,7 +214,7 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese //read unzOpenCurrentFile(pkg); - unzReadCurrentFile(pkg, data.ptr(), data.size()); + unzReadCurrentFile(pkg, data.ptrw(), data.size()); unzCloseCurrentFile(pkg); //write @@ -257,7 +257,7 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese } Vector<uint8_t> buf; buf.resize(f->get_len()); - f->get_buffer(buf.ptr(), buf.size()); + f->get_buffer(buf.ptrw(), buf.size()); memdelete(f); _fix_html(buf, p_preset, p_path.get_file().get_basename(), p_debug); |