From 52a1cedb3d9373d7030dc8a60b988840bafdce49 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Sat, 9 Apr 2022 09:41:43 +0300 Subject: [PATCH] Add missing header guards Use `#pargma once` everywhere. --- esp32/main/menus/about.h | 5 +---- esp32/main/menus/audiowindow.h | 2 ++ esp32/main/menus/debugwindow.h | 2 ++ esp32/main/menus/loadmenu.h | 2 ++ esp32/main/menus/nmimenu.h | 2 ++ esp32/main/menus/savemenu.h | 5 +---- esp32/main/menus/settingsmenu.h | 2 ++ esp32/main/menus/videomodemenu.h | 2 ++ esp32/main/menus/wifimenu.h | 2 ++ esp32/main/wsys/bin.h | 7 +------ esp32/main/wsys/button.h | 6 +----- esp32/main/wsys/callbackmenu.h | 2 ++ esp32/main/wsys/charmap.h | 2 ++ esp32/main/wsys/chooserdialog.h | 2 ++ esp32/main/wsys/core.h | 6 +----- esp32/main/wsys/dialog.h | 5 +---- esp32/main/wsys/disasm.h | 6 +----- esp32/main/wsys/editbox.h | 6 +----- esp32/main/wsys/filechooserdialog.h | 2 ++ esp32/main/wsys/fileentry.h | 5 +---- esp32/main/wsys/filefilter.h | 5 +---- esp32/main/wsys/filelistmenu.h | 5 +---- esp32/main/wsys/filesavedialog.h | 2 ++ esp32/main/wsys/fixedlayout.h | 5 +---- esp32/main/wsys/frame.h | 5 +---- esp32/main/wsys/helpdisplayer.h | 5 +---- esp32/main/wsys/hlayout.h | 5 +---- esp32/main/wsys/indexedmenu.h | 5 +---- esp32/main/wsys/inputdialog.h | 5 +---- esp32/main/wsys/label.h | 6 +----- esp32/main/wsys/layout.h | 5 +---- esp32/main/wsys/menu.h | 7 +------ esp32/main/wsys/menuwindow.h | 2 ++ esp32/main/wsys/menuwindowindexed.h | 5 +---- esp32/main/wsys/messagebox.h | 2 ++ esp32/main/wsys/multiwidget.h | 5 +---- esp32/main/wsys/object_signal.h | 5 +---- esp32/main/wsys/pixel.h | 2 ++ esp32/main/wsys/reg16.h | 6 +----- esp32/main/wsys/screen.h | 6 +----- esp32/main/wsys/slider.h | 5 +---- esp32/main/wsys/stackedwidget.h | 5 +---- esp32/main/wsys/standardfilefilter.h | 5 +---- esp32/main/wsys/tomthumb.h | 2 ++ esp32/main/wsys/vbar.h | 2 ++ esp32/main/wsys/vlayout.h | 5 +---- esp32/main/wsys/widget.h | 5 +---- esp32/main/wsys/widgetgroup.h | 7 ++----- esp32/main/wsys/wifiscanner.h | 2 ++ esp32/main/wsys/window.h | 5 +---- 50 files changed, 69 insertions(+), 140 deletions(-) diff --git a/esp32/main/menus/about.h b/esp32/main/menus/about.h index ede0489a..23866d1c 100644 --- a/esp32/main/menus/about.h +++ b/esp32/main/menus/about.h @@ -1,5 +1,4 @@ -#ifndef __ABOUT_H__ -#define __ABOUT_H__ +#pragma once #include "window.h" @@ -21,5 +20,3 @@ class AboutWindow: public Window Button *m_closebutton; Button *m_firmwarebutton; }; - -#endif diff --git a/esp32/main/menus/audiowindow.h b/esp32/main/menus/audiowindow.h index f1313be6..13bf9bbb 100644 --- a/esp32/main/menus/audiowindow.h +++ b/esp32/main/menus/audiowindow.h @@ -1,3 +1,5 @@ +#pragma once + #include "window.h" #include "slider.h" diff --git a/esp32/main/menus/debugwindow.h b/esp32/main/menus/debugwindow.h index a19a7990..f4961fa4 100644 --- a/esp32/main/menus/debugwindow.h +++ b/esp32/main/menus/debugwindow.h @@ -1,3 +1,5 @@ +#pragma once + #include "window.h" #include "slider.h" #include "debugger.h" diff --git a/esp32/main/menus/loadmenu.h b/esp32/main/menus/loadmenu.h index 0f15239f..1ab8e8e1 100644 --- a/esp32/main/menus/loadmenu.h +++ b/esp32/main/menus/loadmenu.h @@ -1 +1,3 @@ +#pragma once + void loadmenu__show(void); diff --git a/esp32/main/menus/nmimenu.h b/esp32/main/menus/nmimenu.h index 9b6a9800..417436d0 100644 --- a/esp32/main/menus/nmimenu.h +++ b/esp32/main/menus/nmimenu.h @@ -1 +1,3 @@ +#pragma once + void nmimenu__show(void); diff --git a/esp32/main/menus/savemenu.h b/esp32/main/menus/savemenu.h index 48d38be6..fca4fc6e 100644 --- a/esp32/main/menus/savemenu.h +++ b/esp32/main/menus/savemenu.h @@ -1,6 +1,3 @@ -#ifndef __SAVEMENU_H__ -#define __SAVEMENU_H__ +#pragma once void savemenu__show(void); - -#endif diff --git a/esp32/main/menus/settingsmenu.h b/esp32/main/menus/settingsmenu.h index 5f95382d..caedd1fa 100644 --- a/esp32/main/menus/settingsmenu.h +++ b/esp32/main/menus/settingsmenu.h @@ -1 +1,3 @@ +#pragma once + void settings__show(); diff --git a/esp32/main/menus/videomodemenu.h b/esp32/main/menus/videomodemenu.h index 0dc6c014..807344c2 100644 --- a/esp32/main/menus/videomodemenu.h +++ b/esp32/main/menus/videomodemenu.h @@ -1,3 +1,5 @@ +#pragma once + #include "menuwindowindexed.h" diff --git a/esp32/main/menus/wifimenu.h b/esp32/main/menus/wifimenu.h index 8de49411..4701a0a2 100644 --- a/esp32/main/menus/wifimenu.h +++ b/esp32/main/menus/wifimenu.h @@ -1,3 +1,5 @@ +#pragma once + #include "window.h" #include "hlayout.h" #include "indexedmenu.h" diff --git a/esp32/main/wsys/bin.h b/esp32/main/wsys/bin.h index aba6db18..f3e71ca2 100644 --- a/esp32/main/wsys/bin.h +++ b/esp32/main/wsys/bin.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_BIN_H__ -#define __WSYS_BIN_H__ +#pragma once #include "widgetgroup.h" @@ -20,7 +19,3 @@ class Bin: public WidgetGroup Widget *m_child; }; - - - -#endif diff --git a/esp32/main/wsys/button.h b/esp32/main/wsys/button.h index 78751cfd..f0304887 100644 --- a/esp32/main/wsys/button.h +++ b/esp32/main/wsys/button.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_BUTTON_H__ -#define __WSYS_BUTTON_H__ +#pragma once #include "widget.h" #include @@ -26,6 +25,3 @@ class Button: public Widget int m_accel; Signal<> m_clicked; }; - - -#endif diff --git a/esp32/main/wsys/callbackmenu.h b/esp32/main/wsys/callbackmenu.h index 3a9facc8..680a4a24 100644 --- a/esp32/main/wsys/callbackmenu.h +++ b/esp32/main/wsys/callbackmenu.h @@ -1,3 +1,5 @@ +#pragma once + #include "menu.h" class CallbackMenu: public Menu diff --git a/esp32/main/wsys/charmap.h b/esp32/main/wsys/charmap.h index 8e7b59fe..505c3c5e 100644 --- a/esp32/main/wsys/charmap.h +++ b/esp32/main/wsys/charmap.h @@ -1,3 +1,5 @@ +#pragma once + #ifdef __cplusplus extern "C" { #endif diff --git a/esp32/main/wsys/chooserdialog.h b/esp32/main/wsys/chooserdialog.h index fd1ac6d9..750faa6a 100644 --- a/esp32/main/wsys/chooserdialog.h +++ b/esp32/main/wsys/chooserdialog.h @@ -1,3 +1,5 @@ +#pragma once + #include "dialog.h" #include #include diff --git a/esp32/main/wsys/core.h b/esp32/main/wsys/core.h index decc2776..3a139b76 100644 --- a/esp32/main/wsys/core.h +++ b/esp32/main/wsys/core.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_CORE_H__ -#define __WSYS_CORE_H__ +#pragma once #include #include @@ -325,6 +324,3 @@ template void wsys__unsubscribesystemevent(int index); void wsys__propagatesystemevent(const systemevent_t &event); - -#endif - diff --git a/esp32/main/wsys/dialog.h b/esp32/main/wsys/dialog.h index 0691ebd4..9fd46be4 100644 --- a/esp32/main/wsys/dialog.h +++ b/esp32/main/wsys/dialog.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_DIALOG_H__ -#define __WSYS_DIALOG_H__ +#pragma once #include "window.h" @@ -19,5 +18,3 @@ class Dialog: public Window //void *m_cbdata; }; - -#endif diff --git a/esp32/main/wsys/disasm.h b/esp32/main/wsys/disasm.h index 1b712586..925bcaa0 100644 --- a/esp32/main/wsys/disasm.h +++ b/esp32/main/wsys/disasm.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_DISASM_H__ -#define __WSYS_DISASM_H__ +#pragma once #include "widget.h" #include @@ -29,6 +28,3 @@ class Disasm: public Widget std::vector m_entries; }; - - -#endif diff --git a/esp32/main/wsys/editbox.h b/esp32/main/wsys/editbox.h index 0896f581..a475725e 100644 --- a/esp32/main/wsys/editbox.h +++ b/esp32/main/wsys/editbox.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_EDITBOX_H__ -#define __WSYS_EDITBOX_H__ +#pragma once #include "widget.h" #include @@ -22,6 +21,3 @@ class EditBox: public Widget bool m_editable; Signal<> m_enter; }; - - -#endif diff --git a/esp32/main/wsys/filechooserdialog.h b/esp32/main/wsys/filechooserdialog.h index c3a8e65c..a39299f3 100644 --- a/esp32/main/wsys/filechooserdialog.h +++ b/esp32/main/wsys/filechooserdialog.h @@ -1,3 +1,5 @@ +#pragma once + #include "dialog.h" #include #include diff --git a/esp32/main/wsys/fileentry.h b/esp32/main/wsys/fileentry.h index 379ce651..6f1ea84e 100644 --- a/esp32/main/wsys/fileentry.h +++ b/esp32/main/wsys/fileentry.h @@ -1,5 +1,4 @@ -#ifndef __FILEENTRY_H__ -#define __FILEENTRY_H__ +#pragma once #include #include @@ -16,5 +15,3 @@ struct FileEntry { }; typedef std::vector FileEntryList; - -#endif diff --git a/esp32/main/wsys/filefilter.h b/esp32/main/wsys/filefilter.h index 525dbc55..0d1e7edb 100644 --- a/esp32/main/wsys/filefilter.h +++ b/esp32/main/wsys/filefilter.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_FILE_FILTER_H__ -#define __WSYS_FILE_FILTER_H__ +#pragma once #include #include @@ -29,5 +28,3 @@ class FileFilter: public FileFilterBase int m_count; // -1 for no-match, 0 to all-match const char **m_ext; }; - -#endif diff --git a/esp32/main/wsys/filelistmenu.h b/esp32/main/wsys/filelistmenu.h index f39db038..b5786540 100644 --- a/esp32/main/wsys/filelistmenu.h +++ b/esp32/main/wsys/filelistmenu.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_FILELISTMENU_H__ -#define __WSYS_FILELISTMENU_H__ +#pragma once #include "indexedmenu.h" #include "standardfilefilter.h" @@ -31,5 +30,3 @@ class FileListMenu: public IndexedMenu const FileFilter *m_filter; }; - -#endif diff --git a/esp32/main/wsys/filesavedialog.h b/esp32/main/wsys/filesavedialog.h index f9c4258b..c6cb49aa 100644 --- a/esp32/main/wsys/filesavedialog.h +++ b/esp32/main/wsys/filesavedialog.h @@ -1,3 +1,5 @@ +#pragma once + #include "dialog.h" #include #include diff --git a/esp32/main/wsys/fixedlayout.h b/esp32/main/wsys/fixedlayout.h index 7e939295..53312b39 100644 --- a/esp32/main/wsys/fixedlayout.h +++ b/esp32/main/wsys/fixedlayout.h @@ -1,5 +1,4 @@ -#ifndef __FIXEDLAYOUT_H__ -#define __FIXEDLAYOUT_H__ +#pragma once #include "multiwidget.h" @@ -18,5 +17,3 @@ class FixedLayout: public MultiWidget uint8_t m_childw[MULTIWIDGET_MAX_CHILDS]; uint8_t m_childh[MULTIWIDGET_MAX_CHILDS]; }; - -#endif diff --git a/esp32/main/wsys/frame.h b/esp32/main/wsys/frame.h index 1d6b9b7c..bfba805d 100644 --- a/esp32/main/wsys/frame.h +++ b/esp32/main/wsys/frame.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_FRAME_H__ -#define __WSYS_FRAME_H__ +#pragma once #include "bin.h" @@ -22,5 +21,3 @@ class Frame: public Bin uint8_t m_border; bool m_drawbackground; }; - -#endif diff --git a/esp32/main/wsys/helpdisplayer.h b/esp32/main/wsys/helpdisplayer.h index bc75e593..0bfa500d 100644 --- a/esp32/main/wsys/helpdisplayer.h +++ b/esp32/main/wsys/helpdisplayer.h @@ -1,5 +1,4 @@ -#ifndef __HELPDISPLAYER_H__ -#define __HELPDISPLAYER_H__ +#pragma once class HelpDisplayer { @@ -83,5 +82,3 @@ LOCAL int ICACHEFUN(textComputeLength)(const char *str, const textrendersettings return 0; } #endif // 0 -#endif - diff --git a/esp32/main/wsys/hlayout.h b/esp32/main/wsys/hlayout.h index b0065cef..027cfae1 100644 --- a/esp32/main/wsys/hlayout.h +++ b/esp32/main/wsys/hlayout.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_HLAYOUT_H__ -#define __WSYS_HLAYOUT_H__ +#pragma once #include "layout.h" @@ -9,5 +8,3 @@ class HLayout: public Layout HLayout(Widget *parent=NULL); virtual void resizeEvent() override; }; - -#endif diff --git a/esp32/main/wsys/indexedmenu.h b/esp32/main/wsys/indexedmenu.h index 84f06bcf..89125490 100644 --- a/esp32/main/wsys/indexedmenu.h +++ b/esp32/main/wsys/indexedmenu.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_INDEXEDMENU_H__ -#define __WSYS_INDEXEDMENU_H__ +#pragma once #include "menu.h" #include "object_signal.h" @@ -15,5 +14,3 @@ class IndexedMenu: public Menu virtual void activateEntry(uint8_t entry) override; Signal m_selected; }; - -#endif diff --git a/esp32/main/wsys/inputdialog.h b/esp32/main/wsys/inputdialog.h index 2934fed4..b20c10ce 100644 --- a/esp32/main/wsys/inputdialog.h +++ b/esp32/main/wsys/inputdialog.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_INPUT_DIALOG_H__ -#define __WSYS_INPUT_DIALOG_H__ +#pragma once #include "dialog.h" #include "label.h" @@ -23,5 +22,3 @@ class InputDialog: public Dialog EditBox *m_edit; VLayout *m_layout; }; - -#endif diff --git a/esp32/main/wsys/label.h b/esp32/main/wsys/label.h index 8fd93d60..da7e2825 100644 --- a/esp32/main/wsys/label.h +++ b/esp32/main/wsys/label.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_LABEL_H__ -#define __WSYS_LABEL_H__ +#pragma once #include "widget.h" #include @@ -23,6 +22,3 @@ class Label: public Widget uint8_t m_spacing; uint8_t m_newlines; }; - - -#endif diff --git a/esp32/main/wsys/layout.h b/esp32/main/wsys/layout.h index b6144784..01839720 100644 --- a/esp32/main/wsys/layout.h +++ b/esp32/main/wsys/layout.h @@ -1,5 +1,4 @@ -#ifndef __LAYOUT_H__ -#define __LAYOUT_H__ +#pragma once #include "multiwidget.h" #include @@ -33,5 +32,3 @@ class Layout: public MultiWidget uint8_t m_spacing; uint8_t m_border; }; - -#endif diff --git a/esp32/main/wsys/menu.h b/esp32/main/wsys/menu.h index 7663cd83..9dde3288 100644 --- a/esp32/main/wsys/menu.h +++ b/esp32/main/wsys/menu.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_MENU_H__ -#define __WSYS_MENU_H__ +#pragma once #include "widget.h" #include @@ -127,7 +126,3 @@ class Menu: public Widget //const char **m_helpstrings; std::function m_helpfun; }; - - - -#endif diff --git a/esp32/main/wsys/menuwindow.h b/esp32/main/wsys/menuwindow.h index 2da665a1..1286e379 100644 --- a/esp32/main/wsys/menuwindow.h +++ b/esp32/main/wsys/menuwindow.h @@ -1,3 +1,5 @@ +#pragma once + #include "callbackmenu.h" #include "window.h" diff --git a/esp32/main/wsys/menuwindowindexed.h b/esp32/main/wsys/menuwindowindexed.h index 3b57b099..af95fde2 100644 --- a/esp32/main/wsys/menuwindowindexed.h +++ b/esp32/main/wsys/menuwindowindexed.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_MENUWINDOWINDEXED_H__ -#define __WSYS_MENUWINDOWINDEXED_H__ +#pragma once #include "indexedmenu.h" #include "window.h" @@ -23,5 +22,3 @@ class MenuWindowIndexed: public Window private: IndexedMenu *m_menu; }; - -#endif diff --git a/esp32/main/wsys/messagebox.h b/esp32/main/wsys/messagebox.h index 474baca5..3eaf6264 100644 --- a/esp32/main/wsys/messagebox.h +++ b/esp32/main/wsys/messagebox.h @@ -1,3 +1,5 @@ +#pragma once + #include "dialog.h" #include "vlayout.h" #include "hlayout.h" diff --git a/esp32/main/wsys/multiwidget.h b/esp32/main/wsys/multiwidget.h index 20e6cbe2..0708d433 100644 --- a/esp32/main/wsys/multiwidget.h +++ b/esp32/main/wsys/multiwidget.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_MULTIWIDGET_H__ -#define __WSYS_MULTIWIDGET_H__ +#pragma once #include "widgetgroup.h" #include @@ -44,5 +43,3 @@ class MultiWidget: public WidgetGroup private: std::vector m_childs; }; - -#endif diff --git a/esp32/main/wsys/object_signal.h b/esp32/main/wsys/object_signal.h index 843d7e40..eb7c945d 100644 --- a/esp32/main/wsys/object_signal.h +++ b/esp32/main/wsys/object_signal.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_SIGNAL_H__ -#define __WSYS_SIGNAL_H__ +#pragma once #include @@ -21,5 +20,3 @@ class Signal protected: std::function m_function; }; - -#endif diff --git a/esp32/main/wsys/pixel.h b/esp32/main/wsys/pixel.h index 11d3a0fb..f226d080 100644 --- a/esp32/main/wsys/pixel.h +++ b/esp32/main/wsys/pixel.h @@ -1,3 +1,5 @@ +#pragma once + #include "core.h" #include "tomthumb.h" diff --git a/esp32/main/wsys/reg16.h b/esp32/main/wsys/reg16.h index 5cf33417..31df827b 100644 --- a/esp32/main/wsys/reg16.h +++ b/esp32/main/wsys/reg16.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_REG16_H__ -#define __WSYS_REG16_H__ +#pragma once #include "widget.h" #include @@ -20,6 +19,3 @@ class Reg16: public Widget attr_t m_textcolor; attr_t m_valuecolor; }; - - -#endif diff --git a/esp32/main/wsys/screen.h b/esp32/main/wsys/screen.h index 807e72d6..78605747 100644 --- a/esp32/main/wsys/screen.h +++ b/esp32/main/wsys/screen.h @@ -1,5 +1,4 @@ -#ifndef __SCREEN_H__ -#define __SCREEN_H__ +#pragma once #include "core.h" #include "joystick.h" @@ -22,6 +21,3 @@ void screen__releaseKeyboardFocus(Widget *d); void screen__windowLoop(Window *w); void screen__windowVisibilityChanged(Window *s, bool visible); void screen__do_cleanup(); - -#endif - diff --git a/esp32/main/wsys/slider.h b/esp32/main/wsys/slider.h index 90021e73..914234bb 100644 --- a/esp32/main/wsys/slider.h +++ b/esp32/main/wsys/slider.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_SLIDER_H__ -#define __WSYS_SLIDER_H__ +#pragma once #include "widget.h" #include @@ -133,5 +132,3 @@ class Slider: public SliderBase typedef Slider FloatSlider; - -#endif diff --git a/esp32/main/wsys/stackedwidget.h b/esp32/main/wsys/stackedwidget.h index 4d01ea3e..be0c8c17 100644 --- a/esp32/main/wsys/stackedwidget.h +++ b/esp32/main/wsys/stackedwidget.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_STACKEDWIDGET_H__ -#define __WSYS_STACKEDWIDGET_H__ +#pragma once #include "multiwidget.h" @@ -22,5 +21,3 @@ class StackedWidget: public MultiWidget protected: int8_t m_currentindex; }; - -#endif diff --git a/esp32/main/wsys/standardfilefilter.h b/esp32/main/wsys/standardfilefilter.h index 9c56c58f..a620cdf0 100644 --- a/esp32/main/wsys/standardfilefilter.h +++ b/esp32/main/wsys/standardfilefilter.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_STANDARD_FILE_FILTER_H__ -#define __WSYS_STANDARD_FILE_FILTER_H__ +#pragma once #include "filefilter.h" @@ -13,5 +12,3 @@ namespace StandardFileFilter const FileFilter *TAPFileFilter(); const FileFilter *TZXFileFilter(); }; - -#endif diff --git a/esp32/main/wsys/tomthumb.h b/esp32/main/wsys/tomthumb.h index 90952e43..12712924 100644 --- a/esp32/main/wsys/tomthumb.h +++ b/esp32/main/wsys/tomthumb.h @@ -1 +1,3 @@ +#pragma once + extern "C" const unsigned char __tomthumb_bitmap__[]; diff --git a/esp32/main/wsys/vbar.h b/esp32/main/wsys/vbar.h index 48363017..a8a6884c 100644 --- a/esp32/main/wsys/vbar.h +++ b/esp32/main/wsys/vbar.h @@ -1,3 +1,5 @@ +#pragma once + #include "widget.h" class VBar: public Widget diff --git a/esp32/main/wsys/vlayout.h b/esp32/main/wsys/vlayout.h index b54cac25..61e1f37c 100644 --- a/esp32/main/wsys/vlayout.h +++ b/esp32/main/wsys/vlayout.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_VLAYOUT_H__ -#define __WSYS_VLAYOUT_H__ +#pragma once #include "layout.h" @@ -10,5 +9,3 @@ class VLayout: public Layout virtual void resizeEvent() override; protected: }; - -#endif diff --git a/esp32/main/wsys/widget.h b/esp32/main/wsys/widget.h index 1d0ee737..8dac0342 100644 --- a/esp32/main/wsys/widget.h +++ b/esp32/main/wsys/widget.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_WIDGET_H__ -#define __WSYS_WIDGET_H__ +#pragma once #include #include @@ -106,5 +105,3 @@ class Widget: public WSYSObject bool m_hasfocus; bool m_visible; }; - -#endif diff --git a/esp32/main/wsys/widgetgroup.h b/esp32/main/wsys/widgetgroup.h index 53ebb428..dafc057c 100644 --- a/esp32/main/wsys/widgetgroup.h +++ b/esp32/main/wsys/widgetgroup.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_WIDGETGROUP_H__ -#define __WSYS_WIDGETGROUP_H__ +#pragma once #include "widget.h" @@ -15,6 +14,4 @@ class WidgetGroup: public Widget virtual int availableHeight() const { return height(); } }; - - -#endif +\ diff --git a/esp32/main/wsys/wifiscanner.h b/esp32/main/wsys/wifiscanner.h index 305dc458..7f00f26c 100644 --- a/esp32/main/wsys/wifiscanner.h +++ b/esp32/main/wsys/wifiscanner.h @@ -1,3 +1,5 @@ +#pragma once + #include "inttypes.h" #include #include diff --git a/esp32/main/wsys/window.h b/esp32/main/wsys/window.h index 07bf4dc7..35e1ccaf 100644 --- a/esp32/main/wsys/window.h +++ b/esp32/main/wsys/window.h @@ -1,5 +1,4 @@ -#ifndef __WSYS_WINDOW_H__ -#define __WSYS_WINDOW_H__ +#pragma once #include "bin.h" #include "helpdisplayer.h" @@ -60,5 +59,3 @@ class Window: public Bin, public HelpDisplayer const char *m_statustext; Widget *m_focusWidget; }; - -#endif