From c7459e3855c07b63fb6235b86ef459f19641fb0f Mon Sep 17 00:00:00 2001 From: George Marques Date: Wed, 26 May 2021 14:05:31 -0300 Subject: GDScript: Use analyzer data to decide assignment conversion Since there might be tricky cases in the analyzer (in the case of unsafe lines) which would need to be properly checked again. Instead, this splits the code generator in two functions and use information set by the analyzer to tell which function to use, without a need to re-check. --- modules/gdscript/gdscript_byte_codegen.h | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/gdscript/gdscript_byte_codegen.h') diff --git a/modules/gdscript/gdscript_byte_codegen.h b/modules/gdscript/gdscript_byte_codegen.h index f8c05fea83..b1f3cd5fb3 100644 --- a/modules/gdscript/gdscript_byte_codegen.h +++ b/modules/gdscript/gdscript_byte_codegen.h @@ -450,6 +450,7 @@ public: virtual void write_set_member(const Address &p_value, const StringName &p_name) override; virtual void write_get_member(const Address &p_target, const StringName &p_name) override; virtual void write_assign(const Address &p_target, const Address &p_source) override; + virtual void write_assign_with_conversion(const Address &p_target, const Address &p_source) override; virtual void write_assign_true(const Address &p_target) override; virtual void write_assign_false(const Address &p_target) override; virtual void write_assign_default_parameter(const Address &p_dst, const Address &p_src) override; -- cgit v1.2.3