You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Optimize Object::cast_to by assuming no virtual and multiple inheritance, gaining 8x throughput over dynamic_cast.
Add `-Wvirtual-inheritance` to compiler warnings as a sanity check.
This commit is contained in:
@@ -860,7 +860,12 @@ else: # GCC, Clang
|
||||
common_warnings = []
|
||||
|
||||
if methods.using_gcc(env):
|
||||
common_warnings += ["-Wshadow", "-Wno-misleading-indentation"]
|
||||
common_warnings += [
|
||||
"-Wshadow",
|
||||
"-Wno-misleading-indentation",
|
||||
# For optimized Object::cast_to / object.inherits_from()
|
||||
"-Wvirtual-inheritance",
|
||||
]
|
||||
if cc_version_major < 11:
|
||||
# Regression in GCC 9/10, spams so much in our variadic templates
|
||||
# that we need to outright disable it.
|
||||
|
||||
Reference in New Issue
Block a user