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 /editor/export_template_manager.cpp | |
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 'editor/export_template_manager.cpp')
-rw-r--r-- | editor/export_template_manager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index d208bbe662..2aad4774b0 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -207,7 +207,7 @@ void ExportTemplateManager::_install_from_file(const String &p_file) { //read unzOpenCurrentFile(pkg); - ret = unzReadCurrentFile(pkg, data.ptr(), data.size()); + ret = unzReadCurrentFile(pkg, data.ptrw(), data.size()); unzCloseCurrentFile(pkg); String data_str; @@ -277,7 +277,7 @@ void ExportTemplateManager::_install_from_file(const String &p_file) { //read unzOpenCurrentFile(pkg); - unzReadCurrentFile(pkg, data.ptr(), data.size()); + unzReadCurrentFile(pkg, data.ptrw(), data.size()); unzCloseCurrentFile(pkg); print_line(fname); |