Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,

leading to unnecesary copy on writes and reduced performance.
This commit is contained in:
Juan Linietsky
2017-11-25 00:07:54 -03:00
parent 7dfba3cda9
commit bc2e8d99e5
62 changed files with 148 additions and 147 deletions

View File

@@ -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);