Merge pull request #2 from raphaelcoeffic/fix-warnings

Yes it makes sense
This commit is contained in:
Bertrand Songis
2019-11-10 10:15:25 +01:00
committed by GitHub
3 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ class Button : public FormField {
} }
#if defined(HARDWARE_KEYS) #if defined(HARDWARE_KEYS)
void onEvent(event_t event); void onEvent(event_t event) override;
#endif #endif
#if defined(HARDWARE_TOUCH) #if defined(HARDWARE_TOUCH)
+7 -6
View File
@@ -39,7 +39,7 @@ void MainWindow::emptyTrash()
trash.clear(); trash.clear();
} }
void MainWindow::checkEvents(bool trash) void MainWindow::checkEvents()
{ {
#if defined(HARDWARE_TOUCH) #if defined(HARDWARE_TOUCH)
if (touchState.event == TE_DOWN) { if (touchState.event == TE_DOWN) {
@@ -60,10 +60,6 @@ void MainWindow::checkEvents(bool trash)
#endif #endif
Window::checkEvents(); Window::checkEvents();
if (trash) {
emptyTrash();
}
} }
void MainWindow::invalidate(const rect_t & rect) void MainWindow::invalidate(const rect_t & rect)
@@ -106,7 +102,12 @@ bool MainWindow::refresh()
void MainWindow::run(bool trash) void MainWindow::run(bool trash)
{ {
checkEvents(trash); checkEvents();
if (trash) {
emptyTrash();
}
if (refresh()) { if (refresh()) {
lcdRefresh(); lcdRefresh();
} }
+2 -2
View File
@@ -39,7 +39,7 @@ class MainWindow: public Window {
} }
#endif #endif
void checkEvents(bool trash = true); void checkEvents() override;
void invalidate() void invalidate()
{ {
@@ -60,4 +60,4 @@ class MainWindow: public Window {
extern MainWindow mainWindow; extern MainWindow mainWindow;
#endif // _MAINWINDOW_H_ #endif // _MAINWINDOW_H_