diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-01-21 10:34:13 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-01-21 10:59:47 +0100 |
commit | 6fff2b7cc37c35b38401018ed9f557ea2bd959fb (patch) | |
tree | 31dc4c6eb793964532e27dd5bbabaf95dd9b2bdf /src/gui | |
parent | 894eeb76c42ebcf0dc1be9da735f47543c7f6a3a (diff) | |
download | mana-master.tar.gz mana-master.tar.bz2 mana-master.tar.xz mana-master.zip |
Thanks to https://github.com/cgmb/guardonce and a follow-up replace to
remove duplicated newlines at end of file:
find src -type f -name '*.h' -exec \
sed --in-place -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \;
Source: https://unix.stackexchange.com/questions/81685/how-to-remove-multiple-newlines-at-eof
Fixes compile on macOS, which appears to have been due to the EVENT_H
include guard.
Diffstat (limited to 'src/gui')
104 files changed, 104 insertions, 418 deletions
diff --git a/src/gui/beingpopup.h b/src/gui/beingpopup.h index 45169464..377b1b4e 100644 --- a/src/gui/beingpopup.h +++ b/src/gui/beingpopup.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef BEINGPOPUP_H -#define BEINGPOPUP_H +#pragma once #include "gui/widgets/popup.h" @@ -47,5 +46,3 @@ class BeingPopup : public Popup Label *mBeingName; Label *mBeingParty; }; - -#endif // BEINGPOPUP_H diff --git a/src/gui/buydialog.h b/src/gui/buydialog.h index b1126225..4c67ef0d 100644 --- a/src/gui/buydialog.h +++ b/src/gui/buydialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef BUY_H -#define BUY_H +#pragma once #include "guichanfwd.h" @@ -124,5 +123,3 @@ class BuyDialog : public Window, public gcn::ActionListener, int mAmountItems; int mMaxItems; }; - -#endif diff --git a/src/gui/buyselldialog.h b/src/gui/buyselldialog.h index 2e324d42..be382ffa 100644 --- a/src/gui/buyselldialog.h +++ b/src/gui/buyselldialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef BUYSELL_H -#define BUYSELL_H +#pragma once #include "gui/widgets/window.h" @@ -63,5 +62,3 @@ class BuySellDialog : public Window, public gcn::ActionListener int mNpcId; gcn::Button *mBuyButton; }; - -#endif diff --git a/src/gui/changeemaildialog.h b/src/gui/changeemaildialog.h index 37d3ce01..cdf5664c 100644 --- a/src/gui/changeemaildialog.h +++ b/src/gui/changeemaildialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_CHANGEEMAIL_H -#define GUI_CHANGEEMAIL_H +#pragma once #include "gui/widgets/window.h" @@ -64,5 +63,3 @@ class ChangeEmailDialog : public Window, public gcn::ActionListener LoginData *mLoginData; }; - -#endif // GUI_CHANGEEMAIL_H diff --git a/src/gui/changepassworddialog.h b/src/gui/changepassworddialog.h index 22d449d1..541e0444 100644 --- a/src/gui/changepassworddialog.h +++ b/src/gui/changepassworddialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CHANGEPASSWORDDIALOG_H -#define CHANGEPASSWORDDIALOG_H +#pragma once #include "gui/widgets/window.h" @@ -59,5 +58,3 @@ class ChangePasswordDialog : public Window, public gcn::ActionListener LoginData *mLoginData; }; - -#endif diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h index 46db6229..324e9fa2 100644 --- a/src/gui/charcreatedialog.h +++ b/src/gui/charcreatedialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CHAR_CREATE_DIALOG_H -#define CHAR_CREATE_DIALOG_H +#pragma once #include "being.h" #include "guichanfwd.h" @@ -114,5 +113,3 @@ class CharCreateDialog : public Window, public gcn::ActionListener int mSlot; }; - -#endif // CHAR_CREATE_DIALOG_H diff --git a/src/gui/charselectdialog.h b/src/gui/charselectdialog.h index 2deb5a7d..e5e558c9 100644 --- a/src/gui/charselectdialog.h +++ b/src/gui/charselectdialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CHAR_SELECT_H -#define CHAR_SELECT_H +#pragma once #include "gui/widgets/window.h" @@ -100,5 +99,3 @@ class CharSelectDialog : public Window, public gcn::ActionListener, Net::CharHandler *mCharHandler; }; - -#endif diff --git a/src/gui/chatwindow.h b/src/gui/chatwindow.h index 59ab6d99..f47b7140 100644 --- a/src/gui/chatwindow.h +++ b/src/gui/chatwindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CHAT_H -#define CHAT_H +#pragma once #include "eventlistener.h" @@ -216,5 +215,3 @@ class ChatWindow : public Window, }; extern ChatWindow *chatWindow; - -#endif diff --git a/src/gui/confirmdialog.h b/src/gui/confirmdialog.h index 8eb3f46b..ba51558e 100644 --- a/src/gui/confirmdialog.h +++ b/src/gui/confirmdialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef OPTION_DIALOG_H -#define OPTION_DIALOG_H +#pragma once #include "gui/widgets/window.h" @@ -47,5 +46,3 @@ class ConfirmDialog : public Window, public gcn::ActionListener private: TextBox *mTextBox; }; - -#endif diff --git a/src/gui/connectiondialog.h b/src/gui/connectiondialog.h index e76a0a3e..6e477435 100644 --- a/src/gui/connectiondialog.h +++ b/src/gui/connectiondialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONNECTION_H -#define CONNECTION_H +#pragma once #include "client.h" @@ -58,5 +57,3 @@ class ConnectionDialog : public Window, gcn::ActionListener gcn::Label *mLabel; State mCancelState; }; - -#endif diff --git a/src/gui/customserverdialog.h b/src/gui/customserverdialog.h index 8b0af4c8..c17849d5 100644 --- a/src/gui/customserverdialog.h +++ b/src/gui/customserverdialog.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CUSTOMSERVERDIALOG_H -#define CUSTOMSERVERDIALOG_H +#pragma once class Button; class Label; @@ -92,5 +91,3 @@ class CustomServerDialog : public Window, // The index of the entry to modify, -1 when only adding a new entry. int mIndex; }; - -#endif // CUSTOMSERVERDIALOG_H diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h index 3376ae18..63c0517e 100644 --- a/src/gui/debugwindow.h +++ b/src/gui/debugwindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DEBUGWINDOW_H -#define DEBUGWINDOW_H +#pragma once #include "gui/widgets/window.h" @@ -36,5 +35,3 @@ class DebugWindow : public Window }; extern DebugWindow *debugWindow; - -#endif diff --git a/src/gui/emotepopup.h b/src/gui/emotepopup.h index ef3fffed..19336426 100644 --- a/src/gui/emotepopup.h +++ b/src/gui/emotepopup.h @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EMOTEPOPUP_H -#define EMOTEPOPUP_H +#pragma once #include "gui/widgets/popup.h" @@ -116,5 +115,3 @@ class EmotePopup : public Popup static const int gridWidth; static const int gridHeight; }; - -#endif diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h index 1b63c866..a9635279 100644 --- a/src/gui/equipmentwindow.h +++ b/src/gui/equipmentwindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EQUIPMENTWINDOW_H -#define EQUIPMENTWINDOW_H +#pragma once #include "equipment.h" #include "resources/image.h" @@ -96,5 +95,3 @@ class EquipmentWindow : public Window, public gcn::ActionListener }; extern EquipmentWindow *equipmentWindow; - -#endif // EQUIPMENTWINDOW_H diff --git a/src/gui/focushandler.h b/src/gui/focushandler.h index eb59bcf3..d90898bd 100644 --- a/src/gui/focushandler.h +++ b/src/gui/focushandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef FOCUSHANDLER_H -#define FOCUSHANDLER_H +#pragma once #include <guichan/focushandler.hpp> @@ -73,5 +72,3 @@ class FocusHandler : public gcn::FocusHandler */ std::list<gcn::Widget*> mModalStack; }; - -#endif diff --git a/src/gui/gui.h b/src/gui/gui.h index fd1dcf94..da8023b3 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_H -#define GUI_H +#pragma once #include "eventlistener.h" #include "guichanfwd.h" @@ -155,5 +154,3 @@ extern gcn::Font *boldFont; * Monospaced text font */ extern gcn::Font *monoFont; - -#endif // GUI_H diff --git a/src/gui/helpwindow.h b/src/gui/helpwindow.h index 30fa450e..2daf2480 100644 --- a/src/gui/helpwindow.h +++ b/src/gui/helpwindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef HELP_H -#define HELP_H +#pragma once #include "gui/widgets/linkhandler.h" #include "gui/widgets/window.h" @@ -62,5 +61,3 @@ class HelpWindow : public Window, public LinkHandler, }; extern HelpWindow *helpWindow; - -#endif diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h index 048b229c..fec576d7 100644 --- a/src/gui/inventorywindow.h +++ b/src/gui/inventorywindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef INVENTORYWINDOW_H -#define INVENTORYWINDOW_H +#pragma once #include "inventory.h" #include "eventlistener.h" @@ -145,5 +144,3 @@ class InventoryWindow : public Window, }; extern InventoryWindow *inventoryWindow; - -#endif diff --git a/src/gui/itemamountwindow.h b/src/gui/itemamountwindow.h index d0ac52d5..3b73bb7b 100644 --- a/src/gui/itemamountwindow.h +++ b/src/gui/itemamountwindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ITEM_AMOUNT_WINDOW_H -#define ITEM_AMOUNT_WINDOW_H +#pragma once #include "gui/widgets/window.h" @@ -100,5 +99,3 @@ class ItemAmountWindow : public Window, bool mEnabledKeyboard; }; - -#endif // ITEM_AMOUNT_WINDOW_H diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h index 3b213633..535104cf 100644 --- a/src/gui/itempopup.h +++ b/src/gui/itempopup.h @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ITEMPOPUP_H -#define ITEMPOPUP_H +#pragma once #include "gui/widgets/popup.h" @@ -74,5 +73,3 @@ class ItemPopup : public Popup ItemType mItemType; Icon *mIcon; }; - -#endif // ITEMPOPUP_H diff --git a/src/gui/logindialog.h b/src/gui/logindialog.h index 67814cd4..fc3fa249 100644 --- a/src/gui/logindialog.h +++ b/src/gui/logindialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LOGIN_H -#define LOGIN_H +#pragma once #include "gui/widgets/window.h" @@ -69,5 +68,3 @@ class LoginDialog : public Window, public gcn::ActionListener, LoginData *mLoginData; }; - -#endif diff --git a/src/gui/minimap.h b/src/gui/minimap.h index 8212f5b7..bf6cd89d 100644 --- a/src/gui/minimap.h +++ b/src/gui/minimap.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MINIMAP_H -#define MINIMAP_H +#pragma once #include "gui/widgets/window.h" @@ -67,5 +66,3 @@ class Minimap : public Window }; extern Minimap *minimap; - -#endif diff --git a/src/gui/ministatuswindow.h b/src/gui/ministatuswindow.h index db9e4c69..9400b661 100644 --- a/src/gui/ministatuswindow.h +++ b/src/gui/ministatuswindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MINISTATUS_H -#define MINISTATUS_H +#pragma once #include "eventlistener.h" @@ -78,5 +77,3 @@ class MiniStatusWindow : public Popup, public EventListener }; extern MiniStatusWindow *miniStatusWindow; - -#endif diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h index f2b50370..8a18a455 100644 --- a/src/gui/npcdialog.h +++ b/src/gui/npcdialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NPCDIALOG_H -#define NPCDIALOG_H +#pragma once #include "gui/widgets/window.h" @@ -214,5 +213,3 @@ class NpcDialog final : public Window, NpcInputState mInputState = NPC_INPUT_NONE; NpcActionState mActionState = NPC_ACTION_WAIT; }; - -#endif // NPCDIALOG_H diff --git a/src/gui/npcpostdialog.h b/src/gui/npcpostdialog.h index 61c17ca6..7021b5b4 100644 --- a/src/gui/npcpostdialog.h +++ b/src/gui/npcpostdialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_NPCPOSTDIALOG_H -#define GUI_NPCPOSTDIALOG_H +#pragma once #include "gui/widgets/window.h" @@ -57,5 +56,3 @@ private: TextBox *mText; TextField *mSender; }; - -#endif diff --git a/src/gui/okdialog.h b/src/gui/okdialog.h index fcb327a9..f56f24e2 100644 --- a/src/gui/okdialog.h +++ b/src/gui/okdialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef OK_DIALOG_H -#define OK_DIALOG_H +#pragma once #include "gui/widgets/window.h" @@ -47,5 +46,3 @@ class OkDialog : public Window, public gcn::ActionListener private: TextBox *mTextBox; }; - -#endif // OK_DIALOG_H diff --git a/src/gui/outfitwindow.h b/src/gui/outfitwindow.h index 56e96795..661d9b1a 100644 --- a/src/gui/outfitwindow.h +++ b/src/gui/outfitwindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef OUTFITWINDOW_H -#define OUTFITWINDOW_H +#pragma once #include "gui/widgets/window.h" @@ -91,5 +90,3 @@ class OutfitWindow : public Window, gcn::ActionListener }; extern OutfitWindow *outfitWindow; - -#endif diff --git a/src/gui/palette.h b/src/gui/palette.h index 9de911d5..145a93ac 100644 --- a/src/gui/palette.h +++ b/src/gui/palette.h @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PALETTE_H -#define PALETTE_H +#pragma once #include "utils/time.h" @@ -169,5 +168,3 @@ class Palette std::vector<ColorElem> mColors; std::vector<ColorElem*> mGradVector; }; - -#endif diff --git a/src/gui/popupmenu.h b/src/gui/popupmenu.h index c7199b78..5a5a88ee 100644 --- a/src/gui/popupmenu.h +++ b/src/gui/popupmenu.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef POPUP_MENU_H -#define POPUP_MENU_H +#pragma once #include "gui/widgets/linkhandler.h" #include "gui/widgets/popup.h" @@ -76,5 +75,3 @@ class PopupMenu : public Popup, public LinkHandler */ void showPopup(int x, int y); }; - -#endif diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h index d62d5c51..4672e45f 100644 --- a/src/gui/quitdialog.h +++ b/src/gui/quitdialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef QUITDIALOG_H -#define QUITDIALOG_H +#pragma once #include "gui/widgets/window.h" @@ -69,5 +68,3 @@ class QuitDialog : public Window, public gcn::ActionListener, QuitDialog **mMyPointer; }; - -#endif diff --git a/src/gui/recorder.h b/src/gui/recorder.h index efd73021..8a84f423 100644 --- a/src/gui/recorder.h +++ b/src/gui/recorder.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef RECORD_H -#define RECORD_H +#pragma once #include "gui/widgets/window.h" @@ -72,5 +71,3 @@ class Recorder : public Window, public gcn::ActionListener std::ofstream mStream; }; - -#endif diff --git a/src/gui/register.h b/src/gui/register.h index 1996cd47..ae9ee582 100644 --- a/src/gui/register.h +++ b/src/gui/register.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef REGISTER_H -#define REGISTER_H +#pragma once #include "gui/widgets/window.h" @@ -94,5 +93,3 @@ class RegisterDialog : public Window, public gcn::ActionListener, LoginData *mLoginData; }; - -#endif diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h index a29f17ca..599aafe7 100644 --- a/src/gui/sdlinput.h +++ b/src/gui/sdlinput.h @@ -56,8 +56,7 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SDLINPUT_H -#define SDLINPUT_H +#pragma once #include <queue> @@ -204,5 +203,3 @@ protected: bool mMouseDown = false; }; - -#endif diff --git a/src/gui/selldialog.h b/src/gui/selldialog.h index d59343cb..165d9cc8 100644 --- a/src/gui/selldialog.h +++ b/src/gui/selldialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SELL_H -#define SELL_H +#pragma once #include "gui/widgets/window.h" @@ -113,5 +112,3 @@ class SellDialog : public Window, gcn::ActionListener, gcn::SelectionListener int mMaxItems = 0; int mAmountItems = 0; }; - -#endif diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h index 4db36462..b61689bd 100644 --- a/src/gui/serverdialog.h +++ b/src/gui/serverdialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SERVERDIALOG_H -#define SERVERDIALOG_H +#pragma once #include "gui/widgets/window.h" @@ -168,5 +167,3 @@ class ServerDialog : public Window, ServerInfos mServers; ServerInfo *mServerInfo; }; - -#endif diff --git a/src/gui/setup.h b/src/gui/setup.h index d510267d..ec45f93b 100644 --- a/src/gui/setup.h +++ b/src/gui/setup.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SETUP_H -#define SETUP_H +#pragma once #include "gui/widgets/window.h" @@ -72,5 +71,3 @@ class Setup : public Window, public gcn::ActionListener }; extern Setup* setupWindow; - -#endif diff --git a/src/gui/setup_audio.h b/src/gui/setup_audio.h index 4ee277ef..c19b38b6 100644 --- a/src/gui/setup_audio.h +++ b/src/gui/setup_audio.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_SETUP_AUDIO_H -#define GUI_SETUP_AUDIO_H +#pragma once #include "guichanfwd.h" @@ -51,5 +50,3 @@ class Setup_Audio : public SetupTab, public gcn::ActionListener gcn::Slider *mNotificationsSlider; gcn::Slider *mMusicSlider; }; - -#endif // GUI_SETUP_AUDIO_H diff --git a/src/gui/setup_colors.h b/src/gui/setup_colors.h index b534ca8a..9aa5be74 100644 --- a/src/gui/setup_colors.h +++ b/src/gui/setup_colors.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SETUP_COLORS_H -#define SETUP_COLORS_H +#pragma once #include "guichanfwd.h" @@ -87,5 +86,3 @@ class Setup_Colors : public SetupTab, void updateColor(); void updateGradType(); }; - -#endif // SETUP_COLORS_H diff --git a/src/gui/setup_interface.h b/src/gui/setup_interface.h index 530d575a..9f5bbf1a 100644 --- a/src/gui/setup_interface.h +++ b/src/gui/setup_interface.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_SETUP_INTERFACE_H -#define GUI_SETUP_INTERFACE_H +#pragma once #include "being.h" #include "guichanfwd.h" @@ -77,5 +76,3 @@ class Setup_Interface : public SetupTab, public gcn::ActionListener, gcn::DropDown *mFontSizeDropDown; }; - -#endif diff --git a/src/gui/setup_joystick.h b/src/gui/setup_joystick.h index e51ccbe8..8b319ad2 100644 --- a/src/gui/setup_joystick.h +++ b/src/gui/setup_joystick.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_SETUP_JOYSTICK_H -#define GUI_SETUP_JOYSTICK_H +#pragma once #include "guichanfwd.h" @@ -44,5 +43,3 @@ class Setup_Joystick : public SetupTab, public gcn::ActionListener bool mJoystickEnabled; gcn::CheckBox *mJoystickCheckBox; }; - -#endif diff --git a/src/gui/setup_keyboard.h b/src/gui/setup_keyboard.h index 1c9d1733..e953bdf3 100644 --- a/src/gui/setup_keyboard.h +++ b/src/gui/setup_keyboard.h @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_SETUP_KEYBOARD_H -#define GUI_SETUP_KEYBOARD_H +#pragma once #include "guichanfwd.h" @@ -71,5 +70,3 @@ class Setup_Keyboard : public SetupTab, public gcn::ActionListener bool mKeySetting; /**< flag to check if key being set. */ }; - -#endif diff --git a/src/gui/setup_players.h b/src/gui/setup_players.h index 126d621b..3ca422d2 100644 --- a/src/gui/setup_players.h +++ b/src/gui/setup_players.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_SETUP_PLAYERS_H -#define GUI_SETUP_PLAYERS_H +#pragma once #include "guichanfwd.h" #include "playerrelations.h" @@ -70,5 +69,3 @@ private: gcn::CheckBox *mShowGenderCheckBox; gcn::CheckBox *mEnableChatLogCheckBox; }; - -#endif diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h index 6d4fbe77..17b82e00 100644 --- a/src/gui/setup_video.h +++ b/src/gui/setup_video.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_SETUP_VIDEO_H -#define GUI_SETUP_VIDEO_H +#pragma once #include "guichanfwd.h" @@ -80,5 +79,3 @@ class Setup_Video : public SetupTab, public gcn::ActionListener, gcn::CheckBox *mDisableSDLTransparencyCheckBox; }; - -#endif diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h index 7494dfed..68e031ad 100644 --- a/src/gui/shortcutwindow.h +++ b/src/gui/shortcutwindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SHORTCUTWINDOW_H -#define SHORTCUTWINDOW_H +#pragma once #include "gui/widgets/window.h" @@ -39,5 +38,3 @@ class ShortcutWindow : public Window extern ShortcutWindow *itemShortcutWindow; extern ShortcutWindow *emoteShortcutWindow; - -#endif diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h index e88c279f..04810e74 100644 --- a/src/gui/skilldialog.h +++ b/src/gui/skilldialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SKILLDIALOG_H -#define SKILLDIALOG_H +#pragma once #include "gui/widgets/window.h" #include "eventlistener.h" @@ -82,5 +81,3 @@ class SkillDialog : public Window, public gcn::ActionListener, public EventListe }; extern SkillDialog *skillDialog; - -#endif diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h index 350f919c..d23f1b86 100644 --- a/src/gui/socialwindow.h +++ b/src/gui/socialwindow.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SOCIALWINDOW_H -#define SOCIALWINDOW_H +#pragma once #include "utils/time.h" @@ -111,5 +110,3 @@ protected: }; extern SocialWindow *socialWindow; - -#endif // SOCIALWINDOW_H diff --git a/src/gui/specialswindow.h b/src/gui/specialswindow.h index 4ed4db3e..fd2bb120 100644 --- a/src/gui/specialswindow.h +++ b/src/gui/specialswindow.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SPECIALSWINDOW_H -#define SPECIALSWINDOW_H +#pragma once #include "playerinfo.h" @@ -56,5 +55,3 @@ class SpecialsWindow : public Window, public gcn::ActionListener }; extern SpecialsWindow *specialsWindow; - -#endif // SPECIALSWINDOW_H diff --git a/src/gui/speechbubble.h b/src/gui/speechbubble.h index da677dcd..fbb1a21e 100644 --- a/src/gui/speechbubble.h +++ b/src/gui/speechbubble.h @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SPEECHBUBBLE_H -#define SPEECHBUBBLE_H +#pragma once #include "gui/widgets/popup.h" @@ -51,5 +50,3 @@ class SpeechBubble : public Popup gcn::Label *mCaption; TextBox *mSpeechBox; }; - -#endif diff --git a/src/gui/statuswindow.h b/src/gui/statuswindow.h index 99c3b46a..fc7ad67c 100644 --- a/src/gui/statuswindow.h +++ b/src/gui/statuswindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef STATUS_H -#define STATUS_H +#pragma once #include "eventlistener.h" @@ -85,5 +84,3 @@ class StatusWindow : public Window, public EventListener }; extern StatusWindow *statusWindow; - -#endif diff --git a/src/gui/textdialog.h b/src/gui/textdialog.h index 66ab3e53..d9634434 100644 --- a/src/gui/textdialog.h +++ b/src/gui/textdialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_GUILD_DIALOG_H -#define GUI_GUILD_DIALOG_H +#pragma once #include "gui/widgets/window.h" @@ -59,5 +58,3 @@ private: TextField *mTextField; gcn::Button *mOkButton; }; - -#endif diff --git a/src/gui/textpopup.h b/src/gui/textpopup.h index b1c6b2b3..db7d48e7 100644 --- a/src/gui/textpopup.h +++ b/src/gui/textpopup.h @@ -21,8 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef TEXTPOPUP_H -#define TEXTPOPUP_H +#pragma once #include "gui/widgets/popup.h" @@ -51,5 +50,3 @@ class TextPopup : public Popup gcn::Label *mText1; gcn::Label *mText2; }; - -#endif // TEXTPOPUP_H diff --git a/src/gui/tradewindow.h b/src/gui/tradewindow.h index e9d8d4f1..d54ec35e 100644 --- a/src/gui/tradewindow.h +++ b/src/gui/tradewindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TRADE_H -#define TRADE_H +#pragma once #include "gui/widgets/window.h" @@ -134,5 +133,3 @@ class TradeWindow : public Window, gcn::ActionListener, gcn::SelectionListener }; extern TradeWindow *tradeWindow; - -#endif diff --git a/src/gui/truetypefont.h b/src/gui/truetypefont.h index 9aa308b1..a479537d 100644 --- a/src/gui/truetypefont.h +++ b/src/gui/truetypefont.h @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TRUETYPEFONT_H -#define TRUETYPEFONT_H +#pragma once #include <guichan/font.hpp> @@ -82,5 +81,3 @@ class TrueTypeFont : public gcn::Font static std::list<TrueTypeFont*> mFonts; static float mScale; }; - -#endif diff --git a/src/gui/unregisterdialog.h b/src/gui/unregisterdialog.h index c82d7a78..0c94e0af 100644 --- a/src/gui/unregisterdialog.h +++ b/src/gui/unregisterdialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef UNREGISTERDIALOG_H -#define UNREGISTERDIALOG_H +#pragma once #include "gui/widgets/window.h" @@ -57,5 +56,3 @@ class UnRegisterDialog : public Window, public gcn::ActionListener LoginData *mLoginData; }; - -#endif diff --git a/src/gui/updaterwindow.h b/src/gui/updaterwindow.h index 6ea1d754..539783c5 100644 --- a/src/gui/updaterwindow.h +++ b/src/gui/updaterwindow.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef UPDATERWINDOW_H -#define UPDATERWINDOW_H +#pragma once #include "gui/widgets/window.h" @@ -191,5 +190,3 @@ private: ScrollArea *mScrollArea; /**< Used to scroll news box. */ std::unique_ptr<LinkHandler> mLinkHandler; }; - -#endif diff --git a/src/gui/viewport.h b/src/gui/viewport.h index b69a73b6..bf73f8ca 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef VIEWPORT_H -#define VIEWPORT_H +#pragma once #include "eventlistener.h" #include "position.h" @@ -221,5 +220,3 @@ class Viewport : public WindowContainer, public gcn::MouseListener, }; extern Viewport *viewport; /**< The viewport. */ - -#endif diff --git a/src/gui/widgets/avatarlistbox.h b/src/gui/widgets/avatarlistbox.h index 7ee36d1e..638e6223 100644 --- a/src/gui/widgets/avatarlistbox.h +++ b/src/gui/widgets/avatarlistbox.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_GUILDLISTBOX_H -#define GUI_GUILDLISTBOX_H +#pragma once #include "avatar.h" @@ -57,5 +56,3 @@ private: static Image *onlineIcon; static Image *offlineIcon; }; - -#endif diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index 7278bb59..c2a2853d 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef BROWSERBOX_H -#define BROWSERBOX_H +#pragma once #include "utils/time.h" @@ -197,5 +196,3 @@ class BrowserBox : public gcn::Widget, int mLastLayoutWidth = 0; Timer mLayoutTimer; }; - -#endif diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index a09b4445..0f63c9f4 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef BUTTON_H -#define BUTTON_H +#pragma once #include <guichan/widgets/button.hpp> @@ -104,5 +103,3 @@ class Button : public gcn::Button static TextPopup* mTextPopup; std::string mPopupText; /**< the current button text */ }; - -#endif diff --git a/src/gui/widgets/channeltab.h b/src/gui/widgets/channeltab.h index 2894dacd..d6dc1268 100644 --- a/src/gui/widgets/channeltab.h +++ b/src/gui/widgets/channeltab.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CHANNELTAB_H -#define CHANNELTAB_H +#pragma once #include "chattab.h" @@ -51,5 +50,3 @@ class ChannelTab : public ChatTab private: Channel *mChannel; }; - -#endif // CHANNELTAB_H diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h index 3e770fe1..dfc07638 100644 --- a/src/gui/widgets/chattab.h +++ b/src/gui/widgets/chattab.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CHATTAB_H -#define CHATTAB_H +#pragma once #include "gui/chatwindow.h" @@ -135,5 +134,3 @@ class ChatTab : public Tab, public AutoCompleteLister, public EventListener }; extern ChatTab *localChatTab; - -#endif // CHATTAB_H diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h index f77b1761..8b5a4986 100644 --- a/src/gui/widgets/checkbox.h +++ b/src/gui/widgets/checkbox.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CHECKBOX_H -#define CHECKBOX_H +#pragma once #include <guichan/widgets/checkbox.hpp> @@ -74,5 +73,3 @@ class CheckBox : public gcn::CheckBox static Image *checkBoxNormalHi; static Image *checkBoxCheckedHi; }; - -#endif diff --git a/src/gui/widgets/container.h b/src/gui/widgets/container.h index ef44c8cd..9ef805ad 100644 --- a/src/gui/widgets/container.h +++ b/src/gui/widgets/container.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_CONTAINER_H -#define GUI_CONTAINER_H +#pragma once #include <guichan/widgets/container.hpp> @@ -63,5 +62,3 @@ class Container : public gcn::Container private: LayoutHelper *mLayoutHelper = nullptr; }; - -#endif diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h index 5909ac72..a7aa4a1e 100644 --- a/src/gui/widgets/desktop.h +++ b/src/gui/widgets/desktop.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DESKTOP_H -#define DESKTOP_H +#pragma once #include "guichanfwd.h" @@ -66,5 +65,3 @@ class Desktop : public Container, gcn::WidgetListener ResourceRef<Image> mWallpaper; gcn::Label *mVersionLabel; }; - -#endif // DESKTOP_H diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index f92c7dd5..9022e196 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DROPDOWN_H -#define DROPDOWN_H +#pragma once #include <guichan/widgets/dropdown.hpp> @@ -86,6 +85,3 @@ class DropDown : public gcn::DropDown static ImageRect skin; static float mAlpha; }; - -#endif // end DROPDOWN_H - diff --git a/src/gui/widgets/emoteshortcutcontainer.h b/src/gui/widgets/emoteshortcutcontainer.h index ecd41736..08133a50 100644 --- a/src/gui/widgets/emoteshortcutcontainer.h +++ b/src/gui/widgets/emoteshortcutcontainer.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EMOTESHORTCUTCONTAINER_H -#define EMOTESHORTCUTCONTAINER_H +#pragma once #include "gui/widgets/shortcutcontainer.h" @@ -60,5 +59,3 @@ class EmoteShortcutContainer : public ShortcutContainer bool mEmoteClicked = false; int mEmoteMoved = -1; }; - -#endif diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h index 21daae16..46be0919 100644 --- a/src/gui/widgets/flowcontainer.h +++ b/src/gui/widgets/flowcontainer.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef FLOWCONTAINER_H -#define FLOWCONTAINER_H +#pragma once #include "container.h" @@ -56,5 +55,3 @@ class FlowContainer : public Container, int mGridWidth = 1; int mGridHeight = 1; }; - -#endif diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h index 3ebc2c16..5e61520c 100644 --- a/src/gui/widgets/icon.h +++ b/src/gui/widgets/icon.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ICON_H -#define ICON_H +#pragma once #include "resources/resource.h" @@ -68,5 +67,3 @@ class Icon : public gcn::Widget private: ResourceRef<Image> mImage; }; - -#endif // ICON_H diff --git a/src/gui/widgets/inttextfield.h b/src/gui/widgets/inttextfield.h index d5829404..bebad71d 100644 --- a/src/gui/widgets/inttextfield.h +++ b/src/gui/widgets/inttextfield.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef INTTEXTFIELD_H -#define INTTEXTFIELD_H +#pragma once #include "textfield.h" @@ -71,5 +70,3 @@ class IntTextField : public TextField int mDefault; /**< Default value */ int mValue; /**< Current value */ }; - -#endif diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 51807aba..2fb6bb9e 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ITEMCONTAINER_H -#define ITEMCONTAINER_H +#pragma once #include <guichan/keylistener.hpp> #include <guichan/mouselistener.hpp> @@ -196,5 +195,3 @@ class ItemContainer : public gcn::Widget, std::list<gcn::SelectionListener *> mSelectionListeners; }; - -#endif // ITEMCONTAINER_H diff --git a/src/gui/widgets/itemlinkhandler.h b/src/gui/widgets/itemlinkhandler.h index 28e9c11c..58202d33 100644 --- a/src/gui/widgets/itemlinkhandler.h +++ b/src/gui/widgets/itemlinkhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ITEM_LINK_HANDLER_H -#define ITEM_LINK_HANDLER_H +#pragma once #include "gui/widgets/linkhandler.h" @@ -49,5 +48,3 @@ class ItemLinkHandler : public LinkHandler, gcn::ActionListener Window *mParent = nullptr; std::string mLink; }; - -#endif diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h index 243920a0..e346b1b6 100644 --- a/src/gui/widgets/itemshortcutcontainer.h +++ b/src/gui/widgets/itemshortcutcontainer.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ITEMSHORTCUTCONTAINER_H -#define ITEMSHORTCUTCONTAINER_H +#pragma once #include "gui/widgets/shortcutcontainer.h" @@ -71,5 +70,3 @@ class ItemShortcutContainer : public ShortcutContainer ItemPopup *mItemPopup; }; - -#endif diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h index cb7a8b1c..a383517f 100644 --- a/src/gui/widgets/label.h +++ b/src/gui/widgets/label.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LABEL_H -#define LABEL_H +#pragma once #include <guichan/widgets/label.hpp> @@ -46,5 +45,3 @@ class Label : public gcn::Label */ void draw(gcn::Graphics *graphics) override; }; - -#endif diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h index 4e4b28c5..c7652334 100644 --- a/src/gui/widgets/layout.h +++ b/src/gui/widgets/layout.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef WIDGET_LAYOUT_H -#define WIDGET_LAYOUT_H +#pragma once #include <guichan/widgets/container.hpp> @@ -310,5 +309,3 @@ class Layout : public LayoutCell private: bool mComputed; }; - -#endif // WIDGET_LAYOUT_H diff --git a/src/gui/widgets/layouthelper.h b/src/gui/widgets/layouthelper.h index 26360a9a..ad01c565 100644 --- a/src/gui/widgets/layouthelper.h +++ b/src/gui/widgets/layouthelper.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LAYOUTHELPER_H -#define LAYOUTHELPER_H +#pragma once #include "gui/widgets/layout.h" @@ -74,5 +73,3 @@ class LayoutHelper : public gcn::WidgetListener Layout mLayout; /**< Layout handler */ gcn::Container *mContainer; /**< Managed container */ }; - -#endif // LAYOUTHELPER_H diff --git a/src/gui/widgets/linkhandler.h b/src/gui/widgets/linkhandler.h index 33263a25..48b182a1 100644 --- a/src/gui/widgets/linkhandler.h +++ b/src/gui/widgets/linkhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LINK_HANDLER_H -#define LINK_HANDLER_H +#pragma once #include <string> @@ -35,5 +34,3 @@ class LinkHandler virtual void handleLink(const std::string &link) = 0; }; - -#endif diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h index d16256b1..bd95cc39 100644 --- a/src/gui/widgets/listbox.h +++ b/src/gui/widgets/listbox.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LISTBOX_H -#define LISTBOX_H +#pragma once #include <guichan/widgets/listbox.hpp> @@ -65,5 +64,3 @@ class ListBox : public gcn::ListBox protected: static float mAlpha; }; - -#endif diff --git a/src/gui/widgets/passwordfield.h b/src/gui/widgets/passwordfield.h index 4bed0e05..36964843 100644 --- a/src/gui/widgets/passwordfield.h +++ b/src/gui/widgets/passwordfield.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PASSWORDFIELD_H -#define PASSWORDFIELD_H +#pragma once #include "textfield.h" @@ -42,5 +41,3 @@ class PasswordField : public TextField */ void draw(gcn::Graphics *graphics) override; }; - -#endif diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h index 68dd670e..bd94a71f 100644 --- a/src/gui/widgets/playerbox.h +++ b/src/gui/widgets/playerbox.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PLAYERBOX_H -#define PLAYERBOX_H +#pragma once #include <guichan/widgets/scrollarea.hpp> @@ -68,5 +67,3 @@ class PlayerBox : public gcn::ScrollArea static int instances; static ImageRect background; }; - -#endif diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h index c77bf814..41914984 100644 --- a/src/gui/widgets/popup.h +++ b/src/gui/widgets/popup.h @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef POPUP_H -#define POPUP_H +#pragma once #include "guichanfwd.h" @@ -161,5 +160,3 @@ class Popup : public Container, public gcn::MouseListener Skin *mSkin; /**< Skin in use by this popup */ }; - -#endif diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h index 2f9e665f..9f1f6e58 100644 --- a/src/gui/widgets/progressbar.h +++ b/src/gui/widgets/progressbar.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PROGRESSBAR_H -#define PROGRESSBAR_H +#pragma once #include <guichan/widget.hpp> @@ -135,5 +134,3 @@ class ProgressBar : public gcn::Widget static const gcn::Color TEXT_COLOR; }; - -#endif diff --git a/src/gui/widgets/progressindicator.h b/src/gui/widgets/progressindicator.h index 428bbd02..cb66a887 100644 --- a/src/gui/widgets/progressindicator.h +++ b/src/gui/widgets/progressindicator.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PROGRESSINDICATOR_H -#define PROGRESSINDICATOR_H +#pragma once #include <guichan/widget.hpp> @@ -43,5 +42,3 @@ public: private: std::unique_ptr<SimpleAnimation> mIndicator; }; - -#endif // PROGRESSINDICATOR_H diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h index 2a96ff6e..b8026e56 100644 --- a/src/gui/widgets/radiobutton.h +++ b/src/gui/widgets/radiobutton.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef RADIOBUTTON_H -#define RADIOBUTTON_H +#pragma once #include <guichan/widgets/radiobutton.hpp> @@ -69,5 +68,3 @@ class RadioButton : public gcn::RadioButton static Image *radioNormalHi; static Image *radioCheckedHi; }; - -#endif // RADIOBUTTON_H diff --git a/src/gui/widgets/resizegrip.h b/src/gui/widgets/resizegrip.h index d2f8ca4d..7d496950 100644 --- a/src/gui/widgets/resizegrip.h +++ b/src/gui/widgets/resizegrip.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef RESIZEGRIP_H -#define RESIZEGRIP_H +#pragma once #include <guichan/widget.hpp> @@ -50,5 +49,3 @@ class ResizeGrip : public gcn::Widget static int mInstances; /**< Number of resize grip instances */ static float mAlpha; }; - -#endif diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h index 2fae2d4b..ef20610b 100644 --- a/src/gui/widgets/scrollarea.h +++ b/src/gui/widgets/scrollarea.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SCROLLAREA_H -#define SCROLLAREA_H +#pragma once #include <guichan/widgets/scrollarea.hpp> #include <guichan/widgetlistener.hpp> @@ -141,5 +140,3 @@ class ScrollArea : public gcn::ScrollArea, public gcn::WidgetListener bool mHasMouse = false; bool mOpaque = true; }; - -#endif diff --git a/src/gui/widgets/setuptab.h b/src/gui/widgets/setuptab.h index 0cc35a98..78cef5b2 100644 --- a/src/gui/widgets/setuptab.h +++ b/src/gui/widgets/setuptab.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_SETUPTAB_H -#define GUI_SETUPTAB_H +#pragma once #include "gui/widgets/container.h" @@ -58,5 +57,3 @@ protected: private: std::string mName; }; - -#endif diff --git a/src/gui/widgets/shopitems.h b/src/gui/widgets/shopitems.h index e213f67c..1b6e1727 100644 --- a/src/gui/widgets/shopitems.h +++ b/src/gui/widgets/shopitems.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SHOP_H -#define SHOP_H +#pragma once #include <guichan/listmodel.hpp> @@ -111,5 +110,3 @@ class ShopItems : public gcn::ListModel /** Look for duplicate entries on addition. */ bool mMergeDuplicates; }; - -#endif // SHOP_H diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h index 4dbd756b..f6a1b12a 100644 --- a/src/gui/widgets/shoplistbox.h +++ b/src/gui/widgets/shoplistbox.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SHOPLISTBOX_H -#define SHOPLISTBOX_H +#pragma once #include "gui/widgets/listbox.h" @@ -97,5 +96,3 @@ class ShopListBox : public ListBox bool mPriceCheck; }; - -#endif // SHOPLISTBOX_H diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h index cab20f27..dd88bded 100644 --- a/src/gui/widgets/shortcutcontainer.h +++ b/src/gui/widgets/shortcutcontainer.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SHORTCUTCONTAINER_H -#define SHORTCUTCONTAINER_H +#pragma once #include <guichan/mouselistener.hpp> #include <guichan/widget.hpp> @@ -82,5 +81,3 @@ class ShortcutContainer : public gcn::Widget, int mGridWidth = 1; int mGridHeight = 1; }; - -#endif diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h index 3896cb52..edbbcd4d 100644 --- a/src/gui/widgets/slider.h +++ b/src/gui/widgets/slider.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SLIDER_H -#define SLIDER_H +#pragma once #include <guichan/widgets/slider.hpp> @@ -88,5 +87,3 @@ class Slider : public gcn::Slider static float mAlpha; static int mInstances; }; - -#endif diff --git a/src/gui/widgets/spacer.h b/src/gui/widgets/spacer.h index f6a210dc..2fda6e8c 100644 --- a/src/gui/widgets/spacer.h +++ b/src/gui/widgets/spacer.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SPACER_H -#define SPACER_H +#pragma once #include "guichan/graphics.hpp" #include "guichan/widget.hpp" @@ -48,5 +47,3 @@ class Spacer : public gcn::Widget */ void draw(gcn::Graphics *g) override {} }; - -#endif // SPACER_H diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h index 86650257..37d5f0c5 100644 --- a/src/gui/widgets/tab.h +++ b/src/gui/widgets/tab.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TAB_H -#define TAB_H +#pragma once #include <guichan/widgets/tab.hpp> @@ -72,5 +71,3 @@ class Tab : public gcn::Tab const gcn::Color *mTabColor; bool mFlash; }; - -#endif diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index 8e6dcb5f..4b927ee2 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TABBEDAREA_H -#define TABBEDAREA_H +#pragma once #include <guichan/widget.hpp> #include <guichan/widgetlistener.hpp> @@ -151,5 +150,3 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener */ unsigned mTabScrollIndex = 0; }; - -#endif diff --git a/src/gui/widgets/table.h b/src/gui/widgets/table.h index a9202022..3fc2745b 100644 --- a/src/gui/widgets/table.h +++ b/src/gui/widgets/table.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TABLE_H -#define TABLE_H +#pragma once #include "tablemodel.h" @@ -180,6 +179,3 @@ private: /** Vector for compactness; used as a list in practice. */ std::vector<GuiTableActionListener *> mActionListeners; }; - - -#endif // TABLE_H diff --git a/src/gui/widgets/tablemodel.h b/src/gui/widgets/tablemodel.h index d4274e39..2ba36556 100644 --- a/src/gui/widgets/tablemodel.h +++ b/src/gui/widgets/tablemodel.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TABLE_MODEL_H -#define TABLE_MODEL_H +#pragma once #include <guichanfwd.h> @@ -143,5 +142,3 @@ protected: std::vector<gcn::Widget *> mTableModel; std::vector<int> mWidths; }; - -#endif // TABLE_MODEL_H diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h index bcf09ee2..e4596b9a 100644 --- a/src/gui/widgets/textbox.h +++ b/src/gui/widgets/textbox.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TEXTBOX_H -#define TEXTBOX_H +#pragma once #include <guichan/widgets/textbox.hpp> @@ -62,5 +61,3 @@ class TextBox : public gcn::TextBox int mMinWidth; const gcn::Color *mTextColor; }; - -#endif diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h index 9235f4b8..f91b9e8c 100644 --- a/src/gui/widgets/textfield.h +++ b/src/gui/widgets/textfield.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TEXTFIELD_H -#define TEXTFIELD_H +#pragma once #include <guichan/widgets/textfield.hpp> @@ -176,5 +175,3 @@ class TextField : public gcn::TextField TextHistory *mHistory = nullptr; /**< Text history. */ }; - -#endif diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h index 7e88248f..da24b61e 100644 --- a/src/gui/widgets/textpreview.h +++ b/src/gui/widgets/textpreview.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TEXTPREVIEW_H -#define TEXTPREVIEW_H +#pragma once #include <guichan/color.hpp> #include <guichan/font.hpp> @@ -138,5 +137,3 @@ class TextPreview : public gcn::Widget bool mShadow = false; bool mOutline = false; }; - -#endif diff --git a/src/gui/widgets/vertcontainer.h b/src/gui/widgets/vertcontainer.h index b66957d3..a684453f 100644 --- a/src/gui/widgets/vertcontainer.h +++ b/src/gui/widgets/vertcontainer.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUI_VERTCONTAINER_H -#define GUI_VERTCONTAINER_H +#pragma once #include "gui/widgets/container.h" @@ -42,5 +41,3 @@ class VertContainer : public Container, public gcn::WidgetListener int mSpacing; int mCount = 0; }; - -#endif diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h index 0f01bacc..1a0a4a0f 100644 --- a/src/gui/widgets/whispertab.h +++ b/src/gui/widgets/whispertab.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef WHISPERTAB_H -#define WHISPERTAB_H +#pragma once #include "chattab.h" @@ -63,5 +62,3 @@ class WhisperTab : public ChatTab private: std::string mNick; }; - -#endif // CHANNELTAB_H diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index bf6f363c..686e5f43 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef WINDOW_H -#define WINDOW_H +#pragma once #include "graphics.h" #include "guichanfwd.h" @@ -408,5 +407,3 @@ class Window : public gcn::Window, gcn::WidgetListener */ static const int resizeBorderWidth = 10; }; - -#endif diff --git a/src/gui/widgets/windowcontainer.h b/src/gui/widgets/windowcontainer.h index 861839c9..6324b059 100644 --- a/src/gui/widgets/windowcontainer.h +++ b/src/gui/widgets/windowcontainer.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef WINDOWCONTAINER_H -#define WINDOWCONTAINER_H +#pragma once #include "gui/widgets/container.h" @@ -71,5 +70,3 @@ class WindowContainer : public Container }; extern WindowContainer *windowContainer; - -#endif diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h index 0eabc247..b80b62b0 100644 --- a/src/gui/windowmenu.h +++ b/src/gui/windowmenu.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef WINDOWMENU_H -#define WINDOWMENU_H +#pragma once #include "keyboardconfig.h" @@ -62,5 +61,3 @@ class WindowMenu : public Container, EmotePopup *mEmotePopup = nullptr; }; - -#endif diff --git a/src/gui/worldselectdialog.h b/src/gui/worldselectdialog.h index a1150cb8..702a5616 100644 --- a/src/gui/worldselectdialog.h +++ b/src/gui/worldselectdialog.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef WORLD_SELECT_DIALOG_H -#define WORLD_SELECT_DIALOG_H +#pragma once #include "gui/widgets/window.h" @@ -62,5 +61,3 @@ class WorldSelectDialog : public Window, public gcn::ActionListener, gcn::Button *mChangeLoginButton; gcn::Button *mChooseWorld; }; - -#endif // WORLD_SELECT_DIALOG_H |