summaryrefslogtreecommitdiffstats
path: root/core/script_debugger_local.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/script_debugger_local.cpp
parent7dfba3cda9f13427f9f10a6eefbec52aef62274c (diff)
downloadredot-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 'core/script_debugger_local.cpp')
-rw-r--r--core/script_debugger_local.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/script_debugger_local.cpp b/core/script_debugger_local.cpp
index 8d2600e52d..94c48f1c8f 100644
--- a/core/script_debugger_local.cpp
+++ b/core/script_debugger_local.cpp
@@ -212,7 +212,7 @@ void ScriptDebuggerLocal::idle_poll() {
}
SortArray<ScriptLanguage::ProfilingInfo, _ScriptDebuggerLocalProfileInfoSort> sort;
- sort.sort(pinfo.ptr(), ofs);
+ sort.sort(pinfo.ptrw(), ofs);
//falta el frame time
@@ -264,7 +264,7 @@ void ScriptDebuggerLocal::profiling_end() {
}
SortArray<ScriptLanguage::ProfilingInfo, _ScriptDebuggerLocalProfileInfoSort> sort;
- sort.sort(pinfo.ptr(), ofs);
+ sort.sort(pinfo.ptrw(), ofs);
uint64_t total_us = 0;
for (int i = 0; i < ofs; i++) {