summaryrefslogtreecommitdiff
path: root/core/object.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/object.cpp
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 'core/object.cpp')
-rw-r--r--core/object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/object.cpp b/core/object.cpp
index cb6ecefa9d..1be7337d96 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -818,7 +818,7 @@ Variant Object::callv(const StringName &p_method, const Array &p_args) {
}
Variant::CallError ce;
- return call(p_method, argptrs.ptr(), p_args.size(), ce);
+ return call(p_method, (const Variant **)argptrs.ptr(), p_args.size(), ce);
}
Variant Object::call(const StringName &p_name, VARIANT_ARG_DECLARE) {
@@ -1183,7 +1183,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int
bind_mem[p_argcount + j] = &c.binds[j];
}
- args = bind_mem.ptr();
+ args = (const Variant **)bind_mem.ptr();
argc = bind_mem.size();
}