summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2025-01-21 10:34:13 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2025-01-21 10:59:47 +0100
commit6fff2b7cc37c35b38401018ed9f557ea2bd959fb (patch)
tree31dc4c6eb793964532e27dd5bbabaf95dd9b2bdf /src/gui/widgets
parent894eeb76c42ebcf0dc1be9da735f47543c7f6a3a (diff)
downloadmana-master.tar.gz
mana-master.tar.bz2
mana-master.tar.xz
mana-master.zip
Replaced include guards with #pragma onceHEADmaster
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/widgets')
-rw-r--r--src/gui/widgets/avatarlistbox.h5
-rw-r--r--src/gui/widgets/browserbox.h5
-rw-r--r--src/gui/widgets/button.h5
-rw-r--r--src/gui/widgets/channeltab.h5
-rw-r--r--src/gui/widgets/chattab.h5
-rw-r--r--src/gui/widgets/checkbox.h5
-rw-r--r--src/gui/widgets/container.h5
-rw-r--r--src/gui/widgets/desktop.h5
-rw-r--r--src/gui/widgets/dropdown.h6
-rw-r--r--src/gui/widgets/emoteshortcutcontainer.h5
-rw-r--r--src/gui/widgets/flowcontainer.h5
-rw-r--r--src/gui/widgets/icon.h5
-rw-r--r--src/gui/widgets/inttextfield.h5
-rw-r--r--src/gui/widgets/itemcontainer.h5
-rw-r--r--src/gui/widgets/itemlinkhandler.h5
-rw-r--r--src/gui/widgets/itemshortcutcontainer.h5
-rw-r--r--src/gui/widgets/label.h5
-rw-r--r--src/gui/widgets/layout.h5
-rw-r--r--src/gui/widgets/layouthelper.h5
-rw-r--r--src/gui/widgets/linkhandler.h5
-rw-r--r--src/gui/widgets/listbox.h5
-rw-r--r--src/gui/widgets/passwordfield.h5
-rw-r--r--src/gui/widgets/playerbox.h5
-rw-r--r--src/gui/widgets/popup.h5
-rw-r--r--src/gui/widgets/progressbar.h5
-rw-r--r--src/gui/widgets/progressindicator.h5
-rw-r--r--src/gui/widgets/radiobutton.h5
-rw-r--r--src/gui/widgets/resizegrip.h5
-rw-r--r--src/gui/widgets/scrollarea.h5
-rw-r--r--src/gui/widgets/setuptab.h5
-rw-r--r--src/gui/widgets/shopitems.h5
-rw-r--r--src/gui/widgets/shoplistbox.h5
-rw-r--r--src/gui/widgets/shortcutcontainer.h5
-rw-r--r--src/gui/widgets/slider.h5
-rw-r--r--src/gui/widgets/spacer.h5
-rw-r--r--src/gui/widgets/tab.h5
-rw-r--r--src/gui/widgets/tabbedarea.h5
-rw-r--r--src/gui/widgets/table.h6
-rw-r--r--src/gui/widgets/tablemodel.h5
-rw-r--r--src/gui/widgets/textbox.h5
-rw-r--r--src/gui/widgets/textfield.h5
-rw-r--r--src/gui/widgets/textpreview.h5
-rw-r--r--src/gui/widgets/vertcontainer.h5
-rw-r--r--src/gui/widgets/whispertab.h5
-rw-r--r--src/gui/widgets/window.h5
-rw-r--r--src/gui/widgets/windowcontainer.h5
46 files changed, 46 insertions, 186 deletions
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