From a2118129321e4e4868f0ef2dd2b21699a98a126e Mon Sep 17 00:00:00 2001 From: Emmanuel Leblond Date: Tue, 8 Dec 2020 13:06:15 +0100 Subject: Constify ScriptLanguage.can_inherit_from_file --- modules/gdnative/pluginscript/pluginscript_language.cpp | 2 +- modules/gdnative/pluginscript/pluginscript_language.h | 2 +- modules/gdscript/gdscript.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp index 6bde373c08..a2118782d6 100644 --- a/modules/gdnative/pluginscript/pluginscript_language.cpp +++ b/modules/gdnative/pluginscript/pluginscript_language.cpp @@ -142,7 +142,7 @@ bool PluginScriptLanguage::supports_builtin_mode() const { return _desc.supports_builtin_mode; } -bool PluginScriptLanguage::can_inherit_from_file() { +bool PluginScriptLanguage::can_inherit_from_file() const { return _desc.can_inherit_from_file; } diff --git a/modules/gdnative/pluginscript/pluginscript_language.h b/modules/gdnative/pluginscript/pluginscript_language.h index feccef3e81..5e76549822 100644 --- a/modules/gdnative/pluginscript/pluginscript_language.h +++ b/modules/gdnative/pluginscript/pluginscript_language.h @@ -78,7 +78,7 @@ public: virtual Script *create_script() const; virtual bool has_named_classes() const; virtual bool supports_builtin_mode() const; - virtual bool can_inherit_from_file(); + virtual bool can_inherit_from_file() const; virtual int find_function(const String &p_function, const String &p_code) const; virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const; virtual Error complete_code(const String &p_code, const String &p_path, Object *p_owner, List *r_options, bool &r_force, String &r_call_hint); diff --git a/modules/gdscript/gdscript.h b/modules/gdscript/gdscript.h index 3eb260f95f..f949d26664 100644 --- a/modules/gdscript/gdscript.h +++ b/modules/gdscript/gdscript.h @@ -471,7 +471,7 @@ public: virtual bool has_named_classes() const; virtual bool supports_builtin_mode() const; virtual bool supports_documentation() const; - virtual bool can_inherit_from_file() { return true; } + virtual bool can_inherit_from_file() const { return true; } virtual int find_function(const String &p_function, const String &p_code) const; virtual String make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const; virtual Error complete_code(const String &p_code, const String &p_path, Object *p_owner, List *r_options, bool &r_forced, String &r_call_hint); -- cgit v1.2.3