1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

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

@@ -29,11 +29,11 @@
/*************************************************************************/
#include "gdscript.h"
#include "core/engine.h"
#include "editor/editor_settings.h"
#include "gdscript_compiler.h"
#include "global_constants.h"
#include "os/file_access.h"
#include "core/engine.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_file_system.h"
@@ -791,7 +791,7 @@ static bool _guess_expression_type(GDScriptCompletionContext &context, const GDS
}
Variant::CallError ce;
Variant ret = mb->call(baseptr, argptr.ptr(), argptr.size(), ce);
Variant ret = mb->call(baseptr, (const Variant **)argptr.ptr(), argptr.size(), ce);
if (ce.error == Variant::CallError::CALL_OK && ret.get_type() != Variant::NIL) {
@@ -1795,7 +1795,7 @@ static void _find_type_arguments(GDScriptCompletionContext &context, const GDScr
}
} else {
//regular method
//regular method
#if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED)
if (p_argidx < m->get_argument_count()) {