Warnings removed

This commit is contained in:
Bertrand Songis
2020-10-05 09:13:09 +02:00
parent 4a4a548a9f
commit f410d5c74b
4 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ class ModelBitmapWidget: public Widget
{ {
} }
virtual ~ModelBitmapWidget() ~ModelBitmapWidget() override
{ {
delete buffer; delete buffer;
} }
+1 -1
View File
@@ -89,7 +89,7 @@ const ZoneOption OutputsWidget::options[] = {
{ STR_FIRST_CHANNEL, ZoneOption::Integer, OPTION_VALUE_UNSIGNED(1), OPTION_VALUE_UNSIGNED(1), OPTION_VALUE_UNSIGNED(32) }, { STR_FIRST_CHANNEL, ZoneOption::Integer, OPTION_VALUE_UNSIGNED(1), OPTION_VALUE_UNSIGNED(1), OPTION_VALUE_UNSIGNED(32) },
{ STR_FILL_BACKGROUND, ZoneOption::Bool, OPTION_VALUE_BOOL(false) }, { STR_FILL_BACKGROUND, ZoneOption::Bool, OPTION_VALUE_BOOL(false) },
{ STR_BG_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(LIGHTGREY) }, { STR_BG_COLOR, ZoneOption::Color, OPTION_VALUE_UNSIGNED(LIGHTGREY) },
{ NULL, ZoneOption::Bool } { nullptr, ZoneOption::Bool }
}; };
+3 -3
View File
@@ -80,7 +80,7 @@ class WidgetsContainer: public WidgetsContainerInterface
} }
} }
virtual void createWidget(unsigned int index, const WidgetFactory * factory) void createWidget(unsigned int index, const WidgetFactory * factory) override
{ {
if (widgets) { if (widgets) {
memset(persistentData->zones[index].widgetName, 0, sizeof(persistentData->zones[index].widgetName)); memset(persistentData->zones[index].widgetName, 0, sizeof(persistentData->zones[index].widgetName));
@@ -123,9 +123,9 @@ class WidgetsContainer: public WidgetsContainerInterface
return &persistentData->options[index]; return &persistentData->options[index];
} }
virtual unsigned int getZonesCount() const = 0; unsigned int getZonesCount() const override = 0;
virtual Zone getZone(unsigned int index) const = 0; Zone getZone(unsigned int index) const override = 0;
virtual void refresh() virtual void refresh()
{ {
+7 -7
View File
@@ -253,23 +253,23 @@ class LuaWidget: public Widget
LuaWidget(const WidgetFactory * factory, const Zone & zone, Widget::PersistentData * persistentData, int widgetData): LuaWidget(const WidgetFactory * factory, const Zone & zone, Widget::PersistentData * persistentData, int widgetData):
Widget(factory, zone, persistentData), Widget(factory, zone, persistentData),
widgetData(widgetData), widgetData(widgetData),
errorMessage(0) errorMessage(nullptr)
{ {
} }
virtual ~LuaWidget() ~LuaWidget() override
{ {
luaL_unref(lsWidgets, LUA_REGISTRYINDEX, widgetData); luaL_unref(lsWidgets, LUA_REGISTRYINDEX, widgetData);
if (errorMessage) free(errorMessage); free(errorMessage);
} }
virtual void update(); void update() override;
void refresh() override; void refresh() override;
virtual void background(); void background() override;
virtual const char * getErrorMessage() const; const char * getErrorMessage() const override;
protected: protected:
int widgetData; int widgetData;
@@ -300,7 +300,7 @@ class LuaWidgetFactory: public WidgetFactory
{ {
} }
virtual Widget * create(const Zone & zone, Widget::PersistentData * persistentData, bool init=true) const Widget * create(const Zone & zone, Widget::PersistentData * persistentData, bool init=true) const override
{ {
if (lsWidgets == 0) return 0; if (lsWidgets == 0) return 0;
if (init) { if (init) {