summaryrefslogtreecommitdiff
path: root/platform/android/export
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 /platform/android/export
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 'platform/android/export')
-rw-r--r--platform/android/export/export.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 3df52f1635..67e00f4952 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -1391,7 +1391,7 @@ public:
//read
unzOpenCurrentFile(pkg);
- unzReadCurrentFile(pkg, data.ptr(), data.size());
+ unzReadCurrentFile(pkg, data.ptrw(), data.size());
unzCloseCurrentFile(pkg);
//write
@@ -1414,7 +1414,7 @@ public:
FileAccess *f = FileAccess::open(icon_path, FileAccess::READ);
if (f) {
data.resize(f->get_len());
- f->get_buffer(data.ptr(), data.size());
+ f->get_buffer(data.ptrw(), data.size());
memdelete(f);
found = true;
break;
@@ -1428,7 +1428,7 @@ public:
FileAccess *f = FileAccess::open(appicon, FileAccess::READ);
if (f) {
data.resize(f->get_len());
- f->get_buffer(data.ptr(), data.size());
+ f->get_buffer(data.ptrw(), data.size());
memdelete(f);
}
}
@@ -1703,7 +1703,7 @@ public:
int method, level;
unzOpenCurrentFile2(tmp_unaligned, &method, &level, 1); // raw read
long file_offset = unzGetCurrentFileZStreamPos64(tmp_unaligned);
- unzReadCurrentFile(tmp_unaligned, data.ptr(), data.size());
+ unzReadCurrentFile(tmp_unaligned, data.ptrw(), data.size());
unzCloseCurrentFile(tmp_unaligned);
// align