chore(color): Replace dynamic_cast with virtual functions, disable RTTI to reduce FLASH usage (#3885)

* Replace dynamic_cast with virtual functions and disable RTTI.

* Cleanup TopBar class hierarchy.

* Fix compiler warning.
This commit is contained in:
philmoz
2023-08-28 12:55:15 +10:00
committed by GitHub
parent 96d94eeeab
commit dcc2118d19
16 changed files with 49 additions and 43 deletions
+1 -1
View File
@@ -376,7 +376,7 @@ void luaUnregisterWidgets()
{
std::list<const WidgetFactory *> regWidgets(getRegisteredWidgets());
for (auto w : regWidgets) {
if (dynamic_cast<const LuaWidgetFactory*>(w)) {
if (w->isLuaWidgetFactory()) {
delete w;
}
}