diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-03 11:18:27 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-03 11:18:31 +0200 |
commit | 82b87d7a17c39617c7e84065250be77135077e81 (patch) | |
tree | d069e3ded79661351c5cf71bab3f23658d2555e7 /modules | |
parent | d331b803b8e63b0dab406a12c21805a17ee0a6a8 (diff) |
Remove unsupported `NO_SAFE_CAST`/`-fno-rtti` from Android build
Android was the last platform to still attempt to disable RTTI (for binary
size), but both the Android editor and now the ICU library used by templates
need RTTI.
There could still be the possibility to support this for non-ICU template
builds (i.e. without the TextServerAdvanced module), but since this isn't one
of the build configurations we test regularly it's pretty risky to keep this
option only for that specific use case. And our code is already littered with
`dynamic_cast`s which weren't guarded with `!defined(NO_SAFE_CAST)`.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mono/csharp_script.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h index d469c28d4a..e5e53acb07 100644 --- a/modules/mono/csharp_script.h +++ b/modules/mono/csharp_script.h @@ -48,20 +48,10 @@ class CSharpScript; class CSharpInstance; class CSharpLanguage; -#ifdef NO_SAFE_CAST -template <typename TScriptInstance, typename TScriptLanguage> -TScriptInstance *cast_script_instance(ScriptInstance *p_inst) { - if (!p_inst) { - return nullptr; - } - return p_inst->get_language() == TScriptLanguage::get_singleton() ? static_cast<TScriptInstance *>(p_inst) : nullptr; -} -#else template <typename TScriptInstance, typename TScriptLanguage> TScriptInstance *cast_script_instance(ScriptInstance *p_inst) { return dynamic_cast<TScriptInstance *>(p_inst); } -#endif #define CAST_CSHARP_INSTANCE(m_inst) (cast_script_instance<CSharpInstance, CSharpLanguage>(m_inst)) |