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 | |
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.
275 files changed, 280 insertions, 1093 deletions
diff --git a/src/actor.h b/src/actor.h index cd0da7fb..b67b6402 100644 --- a/src/actor.h +++ b/src/actor.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ACTOR_H -#define ACTOR_H +#pragma once #include "vector.h" @@ -131,5 +130,3 @@ protected: private: Actors::iterator mMapActor; }; - -#endif // ACTOR_H diff --git a/src/actorsprite.h b/src/actorsprite.h index 8c20f81f..58780ffb 100644 --- a/src/actorsprite.h +++ b/src/actorsprite.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ACTORSPRITE_H -#define ACTORSPRITE_H +#pragma once #include "actor.h" #include "compoundsprite.h" @@ -207,5 +206,3 @@ private: /** Target cursor being used */ SimpleAnimation *mUsedTargetCursor = nullptr; }; - -#endif // ACTORSPRITE_H diff --git a/src/actorspritemanager.h b/src/actorspritemanager.h index edbe51eb..48ee86e0 100644 --- a/src/actorspritemanager.h +++ b/src/actorspritemanager.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ACTORSPRITEMANAGER_H -#define ACTORSPRITEMANAGER_H +#pragma once #include "actorsprite.h" #include "being.h" @@ -177,5 +176,3 @@ class ActorSpriteManager : public EventListener }; extern ActorSpriteManager *actorSpriteManager; - -#endif // ACTORSPRITEMANAGER_H diff --git a/src/animatedsprite.h b/src/animatedsprite.h index 34655bff..38b85206 100644 --- a/src/animatedsprite.h +++ b/src/animatedsprite.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ANIMATEDSPRITE_H -#define ANIMATEDSPRITE_H +#pragma once #include "sprite.h" @@ -88,5 +87,3 @@ class AnimatedSprite final : public Sprite Animation *mAnimation = nullptr; /**< The currently active animation. */ Frame *mFrame = nullptr; /**< The currently active frame. */ }; - -#endif diff --git a/src/animationparticle.h b/src/animationparticle.h index 432664e5..162eb192 100644 --- a/src/animationparticle.h +++ b/src/animationparticle.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ANIMATION_PARTICLE_H -#define ANIMATION_PARTICLE_H +#pragma once #include "imageparticle.h" #include "simpleanimation.h" @@ -44,5 +43,3 @@ class AnimationParticle : public ImageParticle private: SimpleAnimation mAnimation; /**< Used animation for this particle */ }; - -#endif diff --git a/src/avatar.h b/src/avatar.h index 29fc8c56..2ee73381 100644 --- a/src/avatar.h +++ b/src/avatar.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef AVATAR_H -#define AVATAR_H +#pragma once #include <string> @@ -68,5 +67,3 @@ private: bool mOnline; bool mDisplayBold; }; - -#endif // AVATAR_H diff --git a/src/being.h b/src/being.h index b8c5a0f3..abe056c0 100644 --- a/src/being.h +++ b/src/being.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef BEING_H -#define BEING_H +#pragma once #include "actorsprite.h" #include "eventlistener.h" @@ -542,8 +541,5 @@ class Being : public ActorSprite, public EventListener Vector mSpeedPixelsPerSecond; int mDamageTaken = 0; - int mIp = 0; }; - -#endif diff --git a/src/channel.h b/src/channel.h index c0d48632..8d8acf15 100644 --- a/src/channel.h +++ b/src/channel.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CHANNEL_H -#define CHANNEL_H +#pragma once #include <string> @@ -79,5 +78,3 @@ class Channel std::string mAnnouncement; ChannelTab *mTab; }; - -#endif // CHANNEL_H diff --git a/src/channelmanager.h b/src/channelmanager.h index ffff3047..baaa196a 100644 --- a/src/channelmanager.h +++ b/src/channelmanager.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CHANNELMANAGER_H -#define CHANNELMANAGER_H +#pragma once #include <list> #include <string> @@ -46,5 +45,3 @@ private: }; extern ChannelManager *channelManager; - -#endif diff --git a/src/chatlogger.h b/src/chatlogger.h index e9e53798..45fe7da2 100644 --- a/src/chatlogger.h +++ b/src/chatlogger.h @@ -19,8 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef CHATLOG_H -#define CHATLOG_H +#pragma once #include <fstream> @@ -66,5 +65,3 @@ class ChatLogger }; extern ChatLogger *chatLogger; - -#endif diff --git a/src/client.h b/src/client.h index e7127ddc..abfa8d0a 100644 --- a/src/client.h +++ b/src/client.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CLIENT_H -#define CLIENT_H +#pragma once #include "video.h" @@ -236,8 +235,5 @@ private: SDL_Surface *mIcon = nullptr; SDL_TimerID mSecondsCounterId = 0; - FpsManager mFpsManager; }; - -#endif // CLIENT_H diff --git a/src/commandhandler.h b/src/commandhandler.h index 42f68b2f..e13b0562 100644 --- a/src/commandhandler.h +++ b/src/commandhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef COMMANDHANDLER_H -#define COMMANDHANDLER_H +#pragma once #include <string> @@ -143,5 +142,3 @@ class CommandHandler }; extern CommandHandler *commandHandler; - -#endif // COMMANDHANDLER_H diff --git a/src/compoundsprite.h b/src/compoundsprite.h index 4daffccb..bb5dddc8 100644 --- a/src/compoundsprite.h +++ b/src/compoundsprite.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef COMPOUNDSPRITE_H -#define COMPOUNDSPRITE_H +#pragma once #include "sprite.h" @@ -100,5 +99,3 @@ private: std::vector<Sprite*> mSprites; }; - -#endif // COMPOUNDSPRITE_H diff --git a/src/configuration.h b/src/configuration.h index e0ffae51..510ac269 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIGURATION_H -#define CONFIGURATION_H +#pragma once #include "being.h" #include "defaults.h" @@ -273,5 +272,3 @@ void setConfigValue(T Config::*member, const T &value) config.*member = value; Event(Event::ConfigOptionChanged, member).trigger(Event::ConfigChannel); } - -#endif diff --git a/src/defaults.h b/src/defaults.h index a588a543..8180c694 100644 --- a/src/defaults.h +++ b/src/defaults.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DEFAULTS_H -#define DEFAULTS_H +#pragma once #include <map> #include <string> @@ -29,5 +28,3 @@ using DefaultsData = std::map<std::string, VariableData *>; DefaultsData* getBrandingDefaults(); DefaultsData* getPathsDefaults(); - -#endif diff --git a/src/effectmanager.h b/src/effectmanager.h index 5936f633..8482e15b 100644 --- a/src/effectmanager.h +++ b/src/effectmanager.h @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EFFECT_MANAGER_H -#define EFFECT_MANAGER_H +#pragma once #include <list> #include <string> @@ -62,5 +61,3 @@ class EffectManager }; extern EffectManager *effectManager; - -#endif // EFFECT_MANAGER_H diff --git a/src/emoteshortcut.h b/src/emoteshortcut.h index 598cc124..97648b62 100644 --- a/src/emoteshortcut.h +++ b/src/emoteshortcut.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EMOTESHORTCUT_H -#define EMOTESHORTCUT_H +#pragma once #define SHORTCUT_EMOTES 12 @@ -115,5 +114,3 @@ class EmoteShortcut }; extern EmoteShortcut *emoteShortcut; - -#endif diff --git a/src/equipment.h b/src/equipment.h index d40ca55d..af059d7a 100644 --- a/src/equipment.h +++ b/src/equipment.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EQUIPMENT_H -#define EQUIPMENT_H +#pragma once #include <string> @@ -72,5 +71,3 @@ class Equipment private: Backend *mBackend; }; - -#endif diff --git a/src/event.h b/src/event.h index d3d670e3..a148cef1 100644 --- a/src/event.h +++ b/src/event.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EVENT_H -#define EVENT_H +#pragma once #include <any> #include <map> @@ -324,5 +323,3 @@ inline void serverNotice(const std::string &message) event.setString("message", message); event.trigger(Event::NoticesChannel); } - -#endif // EVENT_H diff --git a/src/eventlistener.h b/src/eventlistener.h index 3d4f8967..8c931fa4 100644 --- a/src/eventlistener.h +++ b/src/eventlistener.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EVENTLISTENER_H -#define EVENTLISTENER_H +#pragma once #include "event.h" @@ -34,5 +33,3 @@ public: virtual void event(Event::Channel channel, const Event &event) = 0; }; - -#endif // EVENTLISTENER_H diff --git a/src/flooritem.h b/src/flooritem.h index 8326982f..82693861 100644 --- a/src/flooritem.h +++ b/src/flooritem.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef FLOORITEM_H -#define FLOORITEM_H +#pragma once #include "actorsprite.h" @@ -69,5 +68,3 @@ class FloorItem : public ActorSprite int mItemId; int mX, mY; }; - -#endif // FLOORITEM_H @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GAME_H -#define GAME_H +#pragma once #include <string> @@ -97,5 +96,3 @@ class Game static Game *mInstance; }; - -#endif diff --git a/src/graphics.h b/src/graphics.h index 9db92034..005acbb0 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GRAPHICS_H -#define GRAPHICS_H +#pragma once #include <SDL.h> @@ -247,5 +246,3 @@ class Graphics : public gcn::Graphics }; extern Graphics *graphics; - -#endif 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 diff --git a/src/guichanfwd.h b/src/guichanfwd.h index 7ef1a419..9c4d8b5f 100644 --- a/src/guichanfwd.h +++ b/src/guichanfwd.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUICHANFWD_H -#define GUICHANFWD_H +#pragma once namespace gcn { @@ -97,5 +96,3 @@ namespace gcn class WidgetListener; class Window; } - -#endif diff --git a/src/guild.h b/src/guild.h index e24893b4..cdd3a357 100644 --- a/src/guild.h +++ b/src/guild.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUILD_H -#define GUILD_H +#pragma once #include "avatar.h" @@ -170,5 +169,3 @@ private: short mId; bool mCanInviteUsers = false; }; - -#endif // GUILD_H diff --git a/src/imageparticle.h b/src/imageparticle.h index ac677389..5e968a38 100644 --- a/src/imageparticle.h +++ b/src/imageparticle.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef IMAGEPARTICLE_H -#define IMAGEPARTICLE_H +#pragma once #include "particle.h" @@ -51,5 +50,3 @@ class ImageParticle : public Particle protected: Image *mImage; /**< The image used for this particle. */ }; - -#endif diff --git a/src/imagesprite.h b/src/imagesprite.h index 4fc69927..ce2bb366 100644 --- a/src/imagesprite.h +++ b/src/imagesprite.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef IMAGESPRITE_H -#define IMAGESPRITE_H +#pragma once #include "sprite.h" @@ -68,5 +67,3 @@ public: private: ResourceRef<Image> mImage; }; - -#endif // IMAGESPRITE_H diff --git a/src/inventory.h b/src/inventory.h index 7aea3013..504965e1 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef INVENTORY_H -#define INVENTORY_H +#pragma once #include <list> @@ -144,5 +143,3 @@ class Inventory int mSize; /**< The max number of inventory items */ int mUsed = 0; /**< THe number of slots in use */ }; - -#endif // INVENTORY_H @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ITEM_H -#define ITEM_H +#pragma once #include "event.h" @@ -123,5 +122,3 @@ class Item bool mInEquipment = false; /**< Item is in equipment */ int mInvIndex; /**< Inventory index. */ }; - -#endif // ITEM_H diff --git a/src/itemshortcut.h b/src/itemshortcut.h index 620973b6..fcec3d7d 100644 --- a/src/itemshortcut.h +++ b/src/itemshortcut.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ITEMSHORTCUT_H -#define ITEMSHORTCUT_H +#pragma once #define SHORTCUT_ITEMS 12 @@ -115,5 +114,3 @@ class ItemShortcut }; extern ItemShortcut *itemShortcut; - -#endif diff --git a/src/joystick.h b/src/joystick.h index 0a5e51a4..c3dea9e1 100644 --- a/src/joystick.h +++ b/src/joystick.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef JOYSTICK_H -#define JOYSTICK_H +#pragma once #include <SDL.h> @@ -99,5 +98,3 @@ class Joystick void doCalibration(); }; - -#endif // JOYSTICK_H diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h index e2d91e29..94b51aff 100644 --- a/src/keyboardconfig.h +++ b/src/keyboardconfig.h @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef KEYBOARDCONFIG_H -#define KEYBOARDCONFIG_H +#pragma once #include <cstdint> #include <string> @@ -235,5 +234,3 @@ class KeyboardConfig }; extern KeyboardConfig keyboard; - -#endif diff --git a/src/localplayer.h b/src/localplayer.h index 34021cbd..0b53964c 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LOCALPLAYER_H -#define LOCALPLAYER_H +#pragma once #include "being.h" @@ -236,5 +235,3 @@ class LocalPlayer final : public Being }; extern LocalPlayer *local_player; - -#endif // LOCALPLAYER_H @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LOG_H -#define LOG_H +#pragma once #include <fstream> @@ -69,5 +68,3 @@ class Logger }; extern Logger *logger; - -#endif @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAIN_H -#define MAIN_H +#pragma once /** * \mainpage @@ -88,5 +87,3 @@ #ifndef PKG_DATADIR #define PKG_DATADIR "" #endif - -#endif @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAP_H -#define MAP_H +#pragma once #include "actor.h" #include "position.h" @@ -421,5 +420,3 @@ class Map : public Properties int mMask = 1; }; - -#endif diff --git a/src/net/adminhandler.h b/src/net/adminhandler.h index 492918a7..87853317 100644 --- a/src/net/adminhandler.h +++ b/src/net/adminhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ADMINHANDLER_H -#define ADMINHANDLER_H +#pragma once #include <string> @@ -39,5 +38,3 @@ class AdminHandler }; } // namespace Net - -#endif // ADMINHANDLER_H diff --git a/src/net/charhandler.h b/src/net/charhandler.h index 72e67739..3f0c096f 100644 --- a/src/net/charhandler.h +++ b/src/net/charhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CHARHANDLER_H -#define CHARHANDLER_H +#pragma once #include "localplayer.h" #include "playerinfo.h" @@ -111,5 +110,3 @@ class CharHandler }; } // namespace Net - -#endif // CHARHANDLER_H diff --git a/src/net/chathandler.h b/src/net/chathandler.h index 382ac39a..5524f458 100644 --- a/src/net/chathandler.h +++ b/src/net/chathandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CHATHANDLER_H -#define CHATHANDLER_H +#pragma once #include <string> @@ -62,5 +61,3 @@ class ChatHandler virtual void requestOnlineList() = 0; }; } - -#endif // CHATHANDLER_H diff --git a/src/net/download.h b/src/net/download.h index 0ce8cc8a..b0f79e79 100644 --- a/src/net/download.h +++ b/src/net/download.h @@ -25,8 +25,7 @@ #include <curl/curl.h> -#ifndef NET_DOWNLOAD_H -#define NET_DOWNLOAD_H +#pragma once enum DownloadStatus { @@ -107,5 +106,3 @@ class Download }; } // namespace Net - -#endif // NET_DOWNLOAD_H diff --git a/src/net/gamehandler.h b/src/net/gamehandler.h index 3f47aba5..08c6c33f 100644 --- a/src/net/gamehandler.h +++ b/src/net/gamehandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAPHANDLER_H -#define MAPHANDLER_H +#pragma once #include <iosfwd> @@ -58,5 +57,3 @@ class GameHandler }; } // namespace Net - -#endif // MAPHANDLER_H diff --git a/src/net/generalhandler.h b/src/net/generalhandler.h index 76cde7ce..21653265 100644 --- a/src/net/generalhandler.h +++ b/src/net/generalhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GENERALHANDLER_H -#define GENERALHANDLER_H +#pragma once namespace Net { @@ -41,5 +40,3 @@ class GeneralHandler }; } // namespace Net - -#endif // GENERALHANDLER_H diff --git a/src/net/guildhandler.h b/src/net/guildhandler.h index 00eae99c..37127599 100644 --- a/src/net/guildhandler.h +++ b/src/net/guildhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef GUILDHANDLER_H -#define GUILDHANDLER_H +#pragma once #include "guild.h" @@ -64,5 +63,3 @@ class GuildHandler }; } - -#endif // GUILDHANDLER_H diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h index 8a67a7db..6e501eb0 100644 --- a/src/net/inventoryhandler.h +++ b/src/net/inventoryhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef INVENTORYHANDLER_H -#define INVENTORYHANDLER_H +#pragma once #include "equipment.h" #include "inventory.h" @@ -99,5 +98,3 @@ class InventoryHandler }; } // namespace Net - -#endif // INVENTORYHANDLER_H diff --git a/src/net/logindata.h b/src/net/logindata.h index 34b259fb..3f2015f4 100644 --- a/src/net/logindata.h +++ b/src/net/logindata.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LOGINDATA_H -#define LOGINDATA_H +#pragma once #include "being.h" @@ -68,5 +67,3 @@ public: resetCharacterSlots(); } }; - -#endif // LOGINDATA_H diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h index 43d15b77..992e0709 100644 --- a/src/net/loginhandler.h +++ b/src/net/loginhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef LOGINHANDLER_H -#define LOGINHANDLER_H +#pragma once #include "net/logindata.h" #include "net/serverinfo.h" @@ -98,5 +97,3 @@ class LoginHandler }; } // namespace Net - -#endif // LOGINHANDLER_H diff --git a/src/net/manaserv/adminhandler.h b/src/net/manaserv/adminhandler.h index fd0c7de0..bc92872b 100644 --- a/src/net/manaserv/adminhandler.h +++ b/src/net/manaserv/adminhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_ADMINHANDLER_H -#define NET_MANASERV_ADMINHANDLER_H +#pragma once #include "net/adminhandler.h" @@ -43,5 +42,3 @@ class AdminHandler final : public Net::AdminHandler, public MessageHandler }; } // namespace ManaServ - -#endif diff --git a/src/net/manaserv/beinghandler.h b/src/net/manaserv/beinghandler.h index 63424de9..b906aedd 100644 --- a/src/net/manaserv/beinghandler.h +++ b/src/net/manaserv/beinghandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_BEINGHANDLER_H -#define NET_MANASERV_BEINGHANDLER_H +#pragma once #include "net/manaserv/messagehandler.h" @@ -55,5 +54,3 @@ class BeingHandler final : public MessageHandler }; } // namespace ManaServ - -#endif diff --git a/src/net/manaserv/buysellhandler.h b/src/net/manaserv/buysellhandler.h index 0629bd7b..c19090e1 100644 --- a/src/net/manaserv/buysellhandler.h +++ b/src/net/manaserv/buysellhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_BUYSELLHANDLER_H -#define NET_MANASERV_BUYSELLHANDLER_H +#pragma once #include "net/manaserv/messagehandler.h" @@ -35,5 +34,3 @@ class BuySellHandler final : public MessageHandler }; } // namespace ManaServ - -#endif diff --git a/src/net/manaserv/charhandler.h b/src/net/manaserv/charhandler.h index 9ec5cdbb..d83ce667 100644 --- a/src/net/manaserv/charhandler.h +++ b/src/net/manaserv/charhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_CHARSERVERHANDLER_H -#define NET_MANASERV_CHARSERVERHANDLER_H +#pragma once #include "gui/charselectdialog.h" @@ -120,5 +119,3 @@ class CharHandler final : public MessageHandler, public Net::CharHandler }; } // namespace ManaServ - -#endif diff --git a/src/net/manaserv/chathandler.h b/src/net/manaserv/chathandler.h index f17883ae..6099fe93 100644 --- a/src/net/manaserv/chathandler.h +++ b/src/net/manaserv/chathandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_CHATHANDLER_H -#define NET_MANASERV_CHATHANDLER_H +#pragma once #include "net/chathandler.h" @@ -127,5 +126,3 @@ class ChatHandler final : public MessageHandler, public Net::ChatHandler }; } // namespace ManaServ - -#endif diff --git a/src/net/manaserv/connection.h b/src/net/manaserv/connection.h index dfd45e31..196d034b 100644 --- a/src/net/manaserv/connection.h +++ b/src/net/manaserv/connection.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_CONNECTION_H -#define NET_MANASERV_CONNECTION_H +#pragma once #include <enet/enet.h> #include "net/manaserv/network.h" @@ -76,5 +75,3 @@ namespace ManaServ State mState = OK; }; } - -#endif // NET_MANASERV_CONNECTION_H diff --git a/src/net/manaserv/defines.h b/src/net/manaserv/defines.h index f1d12339..e224c045 100644 --- a/src/net/manaserv/defines.h +++ b/src/net/manaserv/defines.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MANASERV_DEFINES_H -#define MANASERV_DEFINES_H +#pragma once /** * Attributes used during combat. Available to all the beings. @@ -72,5 +71,3 @@ enum NB_CHARACTER_ATTRIBUTES = CHAR_ATTR_END }; - -#endif // MANASERV_DEFINES_H diff --git a/src/net/manaserv/effecthandler.h b/src/net/manaserv/effecthandler.h index 4ba711d7..9b4e7adf 100644 --- a/src/net/manaserv/effecthandler.h +++ b/src/net/manaserv/effecthandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_EFFECTSHANDLER_H -#define NET_MANASERV_EFFECTSHANDLER_H +#pragma once #include "net/manaserv/messagehandler.h" @@ -41,5 +40,3 @@ class EffectHandler final : public MessageHandler }; } // namespace ManaServ - -#endif // NET_MANASERV_EFFECTSHANDLER_H diff --git a/src/net/manaserv/gamehandler.h b/src/net/manaserv/gamehandler.h index 019c2dfa..4db8a9ee 100644 --- a/src/net/manaserv/gamehandler.h +++ b/src/net/manaserv/gamehandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_MAPHANDLER_H -#define NET_MANASERV_MAPHANDLER_H +#pragma once #include "net/gamehandler.h" @@ -62,5 +61,3 @@ class GameHandler final : public MessageHandler, public Net::GameHandler }; } // namespace ManaServ - -#endif // NET_MANASERV_MAPHANDLER_H diff --git a/src/net/manaserv/generalhandler.h b/src/net/manaserv/generalhandler.h index 582c1796..b9eb9df0 100644 --- a/src/net/manaserv/generalhandler.h +++ b/src/net/manaserv/generalhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_GENERALHANDLER_H -#define NET_MANASERV_GENERALHANDLER_H +#pragma once #include "eventlistener.h" @@ -68,5 +67,3 @@ class GeneralHandler : public Net::GeneralHandler, public EventListener }; } // namespace ManaServ - -#endif // NET_MANASERV_GENERALHANDLER_H diff --git a/src/net/manaserv/guildhandler.h b/src/net/manaserv/guildhandler.h index 666ae862..d7eb798c 100644 --- a/src/net/manaserv/guildhandler.h +++ b/src/net/manaserv/guildhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_GUILDHANDLER_H -#define NET_MANASERV_GUILDHANDLER_H +#pragma once #include "net/guildhandler.h" @@ -67,5 +66,3 @@ protected: }; } // namespace ManaServ - -#endif diff --git a/src/net/manaserv/internal.h b/src/net/manaserv/internal.h index 2961f4bb..701c9ee6 100644 --- a/src/net/manaserv/internal.h +++ b/src/net/manaserv/internal.h @@ -19,12 +19,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_INTERNAL_H -#define NET_MANASERV_INTERNAL_H +#pragma once namespace ManaServ { extern int connections; } - -#endif diff --git a/src/net/manaserv/inventoryhandler.h b/src/net/manaserv/inventoryhandler.h index e01bb5d8..98e02391 100644 --- a/src/net/manaserv/inventoryhandler.h +++ b/src/net/manaserv/inventoryhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_INVENTORYHANDLER_H -#define NET_MANASERV_INVENTORYHANDLER_H +#pragma once #include "eventlistener.h" @@ -146,5 +145,3 @@ class InventoryHandler final : public MessageHandler, Net::InventoryHandler, }; } // namespace ManaServ - -#endif // NET_MANASERV_INVENTORYHANDLER_H diff --git a/src/net/manaserv/itemhandler.h b/src/net/manaserv/itemhandler.h index 22adf8fb..c15d4638 100644 --- a/src/net/manaserv/itemhandler.h +++ b/src/net/manaserv/itemhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_ITEMHANDLER_H -#define NET_MANASERV_ITEMHANDLER_H +#pragma once #include "net/manaserv/messagehandler.h" @@ -35,5 +34,3 @@ class ItemHandler final : public MessageHandler }; } // namespace ManaServ - -#endif // NET_MANASERV_ITEMHANDLER_H diff --git a/src/net/manaserv/loginhandler.h b/src/net/manaserv/loginhandler.h index 87fbe9bc..e8d40835 100644 --- a/src/net/manaserv/loginhandler.h +++ b/src/net/manaserv/loginhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_LOGINHANDLER_H -#define NET_MANASERV_LOGINHANDLER_H +#pragma once #include "net/loginhandler.h" @@ -91,5 +90,3 @@ class LoginHandler final : public MessageHandler, public Net::LoginHandler }; } // namespace ManaServ - -#endif // NET_MANASERV_LOGINHANDLER_H diff --git a/src/net/manaserv/manaserv_protocol.h b/src/net/manaserv/manaserv_protocol.h index 760fe655..b30bf20b 100644 --- a/src/net/manaserv/manaserv_protocol.h +++ b/src/net/manaserv/manaserv_protocol.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MANASERV_PROTOCOL_H -#define MANASERV_PROTOCOL_H +#pragma once namespace ManaServ { @@ -465,5 +464,3 @@ const int PICKUP_RANGE = 32 + 16; const int NPC_TALK_RANGE = 32 * 7; } // namespace ManaServ - -#endif // MANASERV_PROTOCOL_H diff --git a/src/net/manaserv/messagehandler.h b/src/net/manaserv/messagehandler.h index f9ee09ab..2c68cde5 100644 --- a/src/net/manaserv/messagehandler.h +++ b/src/net/manaserv/messagehandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_MESSAGEHANDLER_H -#define NET_MANASERV_MESSAGEHANDLER_H +#pragma once #include "net/messagehandler.h" @@ -44,5 +43,3 @@ class MessageHandler : public Net::MessageHandler using MessageHandlerPtr = const std::unique_ptr<MessageHandler>; } // namespace ManaServ - -#endif // NET_MANASERV_MESSAGEHANDLER_H diff --git a/src/net/manaserv/messagein.h b/src/net/manaserv/messagein.h index 1edc4fe7..cd072fe0 100644 --- a/src/net/manaserv/messagein.h +++ b/src/net/manaserv/messagein.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_MESSAGEIN_H -#define NET_MANASERV_MESSAGEIN_H +#pragma once #include "net/manaserv/manaserv_protocol.h" @@ -95,5 +94,3 @@ class MessageIn }; } // namespace ManaServ - -#endif // NET_MANASERV_MESSAGEIN_H diff --git a/src/net/manaserv/messageout.h b/src/net/manaserv/messageout.h index d452f784..d9d2e68a 100644 --- a/src/net/manaserv/messageout.h +++ b/src/net/manaserv/messageout.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_MESSAGEOUT_H -#define NET_MANASERV_MESSAGEOUT_H +#pragma once #include "net/manaserv/manaserv_protocol.h" @@ -91,5 +90,3 @@ class MessageOut }; } // namespace ManaServ - -#endif // NET_MANASERV_MESSAGEOUT_H diff --git a/src/net/manaserv/network.h b/src/net/manaserv/network.h index f484d54d..a51a8168 100644 --- a/src/net/manaserv/network.h +++ b/src/net/manaserv/network.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_NETWORK_H -#define NET_MANASERV_NETWORK_H +#pragma once #include <iosfwd> @@ -71,5 +70,3 @@ namespace ManaServ */ void flush(); } // namespace ManaServ - -#endif diff --git a/src/net/manaserv/npchandler.h b/src/net/manaserv/npchandler.h index ee3a9a12..6c485650 100644 --- a/src/net/manaserv/npchandler.h +++ b/src/net/manaserv/npchandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_NPCHANDLER_H -#define NET_MANASERV_NPCHANDLER_H +#pragma once #include "net/npchandler.h" @@ -65,5 +64,3 @@ class NpcHandler final : public MessageHandler, public Net::NpcHandler }; } // namespace ManaServ - -#endif // NET_MANASERV_NPCHANDLER_H diff --git a/src/net/manaserv/partyhandler.h b/src/net/manaserv/partyhandler.h index ac4249a9..ab5aad9a 100644 --- a/src/net/manaserv/partyhandler.h +++ b/src/net/manaserv/partyhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_PARTYHANDLER_H -#define NET_MANASERV_PARTYHANDLER_H +#pragma once #include "net/partyhandler.h" @@ -70,5 +69,3 @@ private: }; } // namespace ManaServ - -#endif // NET_MANASERV_PARTYHANDLER_H diff --git a/src/net/manaserv/playerhandler.h b/src/net/manaserv/playerhandler.h index a6839112..134b449c 100644 --- a/src/net/manaserv/playerhandler.h +++ b/src/net/manaserv/playerhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_PLAYERHANDLER_H -#define NET_MANASERV_PLAYERHANDLER_H +#pragma once #include "net/playerhandler.h" @@ -77,5 +76,3 @@ class PlayerHandler final : public MessageHandler, public Net::PlayerHandler }; } // namespace ManaServ - -#endif // NET_MANASERV_PLAYERHANDLER_H diff --git a/src/net/manaserv/specialhandler.h b/src/net/manaserv/specialhandler.h index dbd203d8..45793b62 100644 --- a/src/net/manaserv/specialhandler.h +++ b/src/net/manaserv/specialhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_SKILLHANDLER_H -#define NET_MANASERV_SKILLHANDLER_H +#pragma once #include "net/specialhandler.h" @@ -45,5 +44,3 @@ class SpecialHandler final : public MessageHandler, public Net::SpecialHandler }; } // namespace ManaServ - -#endif // NET_MANASERV_SKILLHANDLER_H diff --git a/src/net/manaserv/tradehandler.h b/src/net/manaserv/tradehandler.h index 928a62d9..374dde16 100644 --- a/src/net/manaserv/tradehandler.h +++ b/src/net/manaserv/tradehandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MANASERV_TRADEHANDLER_H -#define NET_MANASERV_TRADEHANDLER_H +#pragma once #include "net/tradehandler.h" @@ -72,5 +71,3 @@ class TradeHandler final : public MessageHandler, public Net::TradeHandler }; } // namespace ManaServ - -#endif // NET_MANASERV_TRADEHANDLER_H diff --git a/src/net/messagehandler.h b/src/net/messagehandler.h index 3bf6c419..adf61090 100644 --- a/src/net/messagehandler.h +++ b/src/net/messagehandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_MESSAGEHANDLER_H -#define NET_MESSAGEHANDLER_H +#pragma once #include <cstdint> @@ -38,5 +37,3 @@ class MessageHandler }; } // namespace Net - -#endif // NET_MESSAGEHANDLER_H diff --git a/src/net/net.h b/src/net/net.h index 135f2cb7..216c2048 100644 --- a/src/net/net.h +++ b/src/net/net.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_H -#define NET_H +#pragma once /** * \namespace Net @@ -72,5 +71,3 @@ void connectToServer(ServerInfo &server); void unload(); } // namespace Net - -#endif // NET_H diff --git a/src/net/npchandler.h b/src/net/npchandler.h index ac575605..7eeb54f1 100644 --- a/src/net/npchandler.h +++ b/src/net/npchandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NPCHANDLER_H -#define NPCHANDLER_H +#pragma once #include <iosfwd> @@ -61,5 +60,3 @@ class NpcHandler }; } // namespace Net - -#endif // NPCHANDLER_H diff --git a/src/net/partyhandler.h b/src/net/partyhandler.h index 4e14ddbd..58871358 100644 --- a/src/net/partyhandler.h +++ b/src/net/partyhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PARTYHANDLER_H -#define PARTYHANDLER_H +#pragma once #include <string> @@ -74,5 +73,3 @@ class PartyHandler }; } // namespace Net - -#endif // PARTYHANDLER_H diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h index 6187da2a..b9cf1abf 100644 --- a/src/net/playerhandler.h +++ b/src/net/playerhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PLAYERHANDLER_H -#define PLAYERHANDLER_H +#pragma once #include "being.h" #include "flooritem.h" @@ -84,5 +83,3 @@ class PlayerHandler }; } // namespace Net - -#endif // PLAYERHANDLER_H diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h index fd66c676..d9520c1c 100644 --- a/src/net/serverinfo.h +++ b/src/net/serverinfo.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SERVERINFO_H -#define SERVERINFO_H +#pragma once #include "utils/stringutils.h" @@ -110,5 +109,3 @@ public: }; using ServerInfos = std::deque<ServerInfo>; - -#endif // SERVERINFO_H diff --git a/src/net/specialhandler.h b/src/net/specialhandler.h index fb8ffdfd..df09087d 100644 --- a/src/net/specialhandler.h +++ b/src/net/specialhandler.h @@ -19,12 +19,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SPECIALHANDLER_H -#define SPECIALHANDLER_H +#pragma once #include <iosfwd> namespace Net { + class SpecialHandler { public: @@ -38,6 +38,5 @@ class SpecialHandler virtual void use(int id, const std::string &map) = 0; }; -} -#endif // SPECIALHANDLER_H +} // namespace Net diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h index 17d547a8..6a233823 100644 --- a/src/net/tmwa/adminhandler.h +++ b/src/net/tmwa/adminhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_ADMINHANDLER_H -#define NET_TA_ADMINHANDLER_H +#pragma once #include "net/adminhandler.h" #include "net/net.h" @@ -44,5 +43,3 @@ class AdminHandler final : public MessageHandler, public Net::AdminHandler }; } // namespace TmwAthena - -#endif // NET_TA_ADMINHANDLER_H diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h index f1c8887f..fd8f08f5 100644 --- a/src/net/tmwa/beinghandler.h +++ b/src/net/tmwa/beinghandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_BEINGHANDLER_H -#define NET_TA_BEINGHANDLER_H +#pragma once #include "net/tmwa/messagehandler.h" @@ -39,5 +38,3 @@ class BeingHandler final : public MessageHandler }; } // namespace TmwAthena - -#endif // NET_TA_BEINGHANDLER_H diff --git a/src/net/tmwa/buysellhandler.h b/src/net/tmwa/buysellhandler.h index 8f7a324f..cad9f943 100644 --- a/src/net/tmwa/buysellhandler.h +++ b/src/net/tmwa/buysellhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_BUYSELLHANDLER_H -#define NET_TA_BUYSELLHANDLER_H +#pragma once #include "net/tmwa/messagehandler.h" @@ -41,5 +40,3 @@ class BuySellHandler final : public MessageHandler }; } // namespace TmwAthena - -#endif // NET_TA_BUYSELLHANDLER_H diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h index 9633c8d9..646a545e 100644 --- a/src/net/tmwa/charserverhandler.h +++ b/src/net/tmwa/charserverhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_CHARSERVERHANDLER_H -#define NET_TA_CHARSERVERHANDLER_H +#pragma once #include "net/charhandler.h" @@ -79,5 +78,3 @@ class CharServerHandler final : public MessageHandler, public Net::CharHandler }; } // namespace TmwAthena - -#endif // NET_TA_CHARSERVERHANDLER_H diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h index d545b221..b16b3dc4 100644 --- a/src/net/tmwa/chathandler.h +++ b/src/net/tmwa/chathandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_CHATHANDLER_H -#define NET_TA_CHATHANDLER_H +#pragma once #include "net/chathandler.h" #include "net/net.h" @@ -73,5 +72,3 @@ class ChatHandler final : public MessageHandler, public Net::ChatHandler }; } // namespace TmwAthena - -#endif // NET_TA_CHATHANDLER_H diff --git a/src/net/tmwa/gamehandler.h b/src/net/tmwa/gamehandler.h index ecd8df2d..2f876b82 100644 --- a/src/net/tmwa/gamehandler.h +++ b/src/net/tmwa/gamehandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_MAPHANDLER_H -#define NET_TA_MAPHANDLER_H +#pragma once #include "eventlistener.h" @@ -74,5 +73,3 @@ class GameHandler final : public MessageHandler, public Net::GameHandler, }; } // namespace TmwAthena - -#endif // NET_TA_MAPHANDLER_H diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h index f105da96..26c6fe27 100644 --- a/src/net/tmwa/generalhandler.h +++ b/src/net/tmwa/generalhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TMWA_GENERALHANDLER_H -#define NET_TMWA_GENERALHANDLER_H +#pragma once #include "eventlistener.h" @@ -72,5 +71,3 @@ class GeneralHandler final : public MessageHandler, public Net::GeneralHandler, }; } // namespace TmwAthena - -#endif // NET_TMWA_GENERALHANDLER_H diff --git a/src/net/tmwa/gui/guildtab.h b/src/net/tmwa/gui/guildtab.h index 3f864748..c51e63d0 100644 --- a/src/net/tmwa/gui/guildtab.h +++ b/src/net/tmwa/gui/guildtab.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TA_GUILDTAB_H -#define TA_GUILDTAB_H +#pragma once #include "gui/widgets/chattab.h" @@ -49,5 +48,3 @@ class GuildTab : public ChatTab extern GuildTab *guildTab; } // namespace TmwAthena - -#endif // TA_GUILDTAB_H diff --git a/src/net/tmwa/gui/partytab.h b/src/net/tmwa/gui/partytab.h index a6c52f58..39a1f978 100644 --- a/src/net/tmwa/gui/partytab.h +++ b/src/net/tmwa/gui/partytab.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TA_PARTYTAB_H -#define TA_PARTYTAB_H +#pragma once #include "gui/widgets/chattab.h" @@ -49,5 +48,3 @@ class PartyTab : public ChatTab extern PartyTab *partyTab; } // namespace TmwAthena - -#endif // TA_PARTYTAB_H diff --git a/src/net/tmwa/guildhandler.h b/src/net/tmwa/guildhandler.h index 9bbe9b4a..6faca0cc 100644 --- a/src/net/tmwa/guildhandler.h +++ b/src/net/tmwa/guildhandler.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_GUILDHANDLER_H -#define NET_TA_GUILDHANDLER_H +#pragma once #include "net/guildhandler.h" @@ -67,5 +66,3 @@ class GuildHandler final : public Net::GuildHandler, public MessageHandler }; } - -#endif // NET_TA_GUILDHANDLER_H diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h index 51a0fe51..49f0e26e 100644 --- a/src/net/tmwa/inventoryhandler.h +++ b/src/net/tmwa/inventoryhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_INVENTORYHANDLER_H -#define NET_TA_INVENTORYHANDLER_H +#pragma once #include "eventlistener.h" #include "inventory.h" @@ -195,5 +194,3 @@ class InventoryHandler final : public MessageHandler, public Net::InventoryHandl }; } // namespace TmwAthena - -#endif // NET_TA_INVENTORYHANDLER_H diff --git a/src/net/tmwa/itemhandler.h b/src/net/tmwa/itemhandler.h index 0c6175d8..5e42e0d8 100644 --- a/src/net/tmwa/itemhandler.h +++ b/src/net/tmwa/itemhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_ITEMHANDLER_H -#define NET_TA_ITEMHANDLER_H +#pragma once #include "net/tmwa/messagehandler.h" @@ -35,5 +34,3 @@ class ItemHandler final : public MessageHandler }; } // namespace TmwAthena - -#endif // NET_TA_ITEMHANDLER_H diff --git a/src/net/tmwa/loginhandler.h b/src/net/tmwa/loginhandler.h index 25dd414d..f6b8a530 100644 --- a/src/net/tmwa/loginhandler.h +++ b/src/net/tmwa/loginhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TMWA_LOGINHANDLER_H -#define NET_TMWA_LOGINHANDLER_H +#pragma once #include "net/loginhandler.h" @@ -94,5 +93,3 @@ class LoginHandler final : public MessageHandler, public Net::LoginHandler }; } // namespace TmwAthena - -#endif // NET_TA_LOGINHANDLER_H diff --git a/src/net/tmwa/messagehandler.h b/src/net/tmwa/messagehandler.h index 0d278c15..8e3c6a19 100644 --- a/src/net/tmwa/messagehandler.h +++ b/src/net/tmwa/messagehandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_MESSAGEHANDLER_H -#define NET_TA_MESSAGEHANDLER_H +#pragma once #include "net/messagehandler.h" @@ -52,5 +51,3 @@ class MessageHandler : public Net::MessageHandler using MessageHandlerPtr = const std::unique_ptr<MessageHandler>; } - -#endif // NET_TA_MESSAGEHANDLER_H diff --git a/src/net/tmwa/messagein.h b/src/net/tmwa/messagein.h index 2f66ca28..b2fb6716 100644 --- a/src/net/tmwa/messagein.h +++ b/src/net/tmwa/messagein.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_MESSAGEIN_H -#define NET_TA_MESSAGEIN_H +#pragma once #include <cstdint> #include <string> @@ -109,5 +108,3 @@ class MessageIn }; } // TmwAthena - -#endif // NET_TA_MESSAGEIN_H diff --git a/src/net/tmwa/messageout.h b/src/net/tmwa/messageout.h index b60644de..ba2d3c75 100644 --- a/src/net/tmwa/messageout.h +++ b/src/net/tmwa/messageout.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_MESSAGEOUT_H -#define NET_TA_MESSAGEOUT_H +#pragma once #include <cstdint> #include <string> @@ -73,5 +72,3 @@ class MessageOut }; } // namespace TmwAthena - -#endif // NET_TA_MESSAGEOUT_H diff --git a/src/net/tmwa/network.h b/src/net/tmwa/network.h index fa0237dd..53f15761 100644 --- a/src/net/tmwa/network.h +++ b/src/net/tmwa/network.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_NETWORK_H -#define NET_TA_NETWORK_H +#pragma once #include "utils/mutex.h" @@ -125,5 +124,3 @@ class Network }; } // namespace TmwAthena - -#endif // NET_TA_NETWORK_H diff --git a/src/net/tmwa/npchandler.h b/src/net/tmwa/npchandler.h index b55a8155..df23531f 100644 --- a/src/net/tmwa/npchandler.h +++ b/src/net/tmwa/npchandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_NPCHANDLER_H -#define NET_TA_NPCHANDLER_H +#pragma once #include "net/npchandler.h" @@ -65,5 +64,3 @@ class NpcHandler final : public MessageHandler, public Net::NpcHandler }; } // namespace TmwAthena - -#endif // NET_TA_NPCHANDLER_H diff --git a/src/net/tmwa/partyhandler.h b/src/net/tmwa/partyhandler.h index 14c6d9f3..3f99de20 100644 --- a/src/net/tmwa/partyhandler.h +++ b/src/net/tmwa/partyhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_PARTYHANDLER_H -#define NET_TA_PARTYHANDLER_H +#pragma once #include "net/net.h" #include "net/partyhandler.h" @@ -71,5 +70,3 @@ class PartyHandler final : public MessageHandler, public Net::PartyHandler }; } // namespace TmwAthena - -#endif // NET_TA_PARTYHANDLER_H diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h index 1a90532e..f1a67e94 100644 --- a/src/net/tmwa/playerhandler.h +++ b/src/net/tmwa/playerhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_PLAYERHANDLER_H -#define NET_TA_PLAYERHANDLER_H +#pragma once #include "net/net.h" #include "net/playerhandler.h" @@ -67,5 +66,3 @@ class PlayerHandler final : public MessageHandler, public Net::PlayerHandler }; } // namespace TmwAthena - -#endif // NET_TA_PLAYERHANDLER_H diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h index 609b18a5..d00a5f4f 100644 --- a/src/net/tmwa/protocol.h +++ b/src/net/tmwa/protocol.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TA_PROTOCOL_H -#define TA_PROTOCOL_H +#pragma once #include <cstdint> @@ -283,5 +282,3 @@ enum { }; } - -#endif diff --git a/src/net/tmwa/specialhandler.h b/src/net/tmwa/specialhandler.h index 09b6ce8d..2448b7e0 100644 --- a/src/net/tmwa/specialhandler.h +++ b/src/net/tmwa/specialhandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_SKILLHANDLER_H -#define NET_TA_SKILLHANDLER_H +#pragma once #include "net/net.h" #include "net/specialhandler.h" @@ -46,5 +45,3 @@ class SpecialHandler final : public MessageHandler, public Net::SpecialHandler }; } // namespace TmwAthena - -#endif // NET_TA_SKILLHANDLER_H diff --git a/src/net/tmwa/token.h b/src/net/tmwa/token.h index c0a2b3c8..8c078c6c 100644 --- a/src/net/tmwa/token.h +++ b/src/net/tmwa/token.h @@ -21,8 +21,7 @@ #include "being.h" -#ifndef NET_TA_TOKEN_H -#define NET_TA_TOKEN_H +#pragma once struct Token { @@ -39,5 +38,3 @@ struct Token sex = Gender::UNSPECIFIED; } }; - -#endif // NET_TA_TOKEN_H diff --git a/src/net/tmwa/tradehandler.h b/src/net/tmwa/tradehandler.h index fa7ec034..1a2cfcef 100644 --- a/src/net/tmwa/tradehandler.h +++ b/src/net/tmwa/tradehandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NET_TA_TRADEHANDLER_H -#define NET_TA_TRADEHANDLER_H +#pragma once #include "net/net.h" #include "net/tradehandler.h" @@ -57,5 +56,3 @@ class TradeHandler final : public MessageHandler, public Net::TradeHandler }; } // namespace TmwAthena - -#endif // NET_TA_TRADEHANDLER_H diff --git a/src/net/tradehandler.h b/src/net/tradehandler.h index 609f8087..605d122b 100644 --- a/src/net/tradehandler.h +++ b/src/net/tradehandler.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TRADEHANDLER_H -#define TRADEHANDLER_H +#pragma once #include "being.h" @@ -49,5 +48,3 @@ class TradeHandler virtual void cancel() {} }; } - -#endif // TRADEHANDLER_H diff --git a/src/net/worldinfo.h b/src/net/worldinfo.h index d9596239..acc8a376 100644 --- a/src/net/worldinfo.h +++ b/src/net/worldinfo.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef WORLD_INFO_H -#define WORLD_INFO_H +#pragma once #include <string> #include <vector> @@ -34,5 +33,3 @@ struct WorldInfo { }; using Worlds = std::vector<WorldInfo *>; - -#endif // WORLD_INFO_H diff --git a/src/openglgraphics.h b/src/openglgraphics.h index 7178128b..2245938a 100644 --- a/src/openglgraphics.h +++ b/src/openglgraphics.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef OPENGLGRAPHICS_H -#define OPENGLGRAPHICS_H +#pragma once #ifdef USE_OPENGL #include "graphics.h" @@ -135,5 +134,3 @@ class OpenGLGraphics final : public Graphics bool mReduceInputLag = true; }; #endif //USE_OPENGL - -#endif diff --git a/src/particle.h b/src/particle.h index 1c991878..fb441b1b 100644 --- a/src/particle.h +++ b/src/particle.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PARTICLE_H -#define PARTICLE_H +#pragma once #include "actor.h" #include "guichanfwd.h" @@ -293,5 +292,3 @@ class Particle : public Actor }; extern Particle *particleEngine; - -#endif diff --git a/src/particlecontainer.h b/src/particlecontainer.h index 3905ee49..5656a7fd 100644 --- a/src/particlecontainer.h +++ b/src/particlecontainer.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PARTICLE_CONTAINER_H -#define PARTICLE_CONTAINER_H +#pragma once #include <list> #include <vector> @@ -117,5 +116,3 @@ public: protected: std::vector<Particle *> mIndexedElements; }; - -#endif diff --git a/src/particleemitter.h b/src/particleemitter.h index 9d226209..ede5a71d 100644 --- a/src/particleemitter.h +++ b/src/particleemitter.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PARTICLEEMITTER_H -#define PARTICLEEMITTER_H +#pragma once #include "particleemitterprop.h" @@ -140,4 +139,3 @@ class ParticleEmitter /** List of emitters the spawned particles are equipped with */ std::list<ParticleEmitter> mParticleChildEmitters; }; -#endif diff --git a/src/particleemitterprop.h b/src/particleemitterprop.h index eb719e57..78f349b8 100644 --- a/src/particleemitterprop.h +++ b/src/particleemitterprop.h @@ -19,6 +19,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#pragma once + #include <cmath> static const double PI = 3.14159265; diff --git a/src/party.h b/src/party.h index d96500ca..14d82352 100644 --- a/src/party.h +++ b/src/party.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PARTY_H -#define PARTY_H +#pragma once #include "avatar.h" @@ -171,5 +170,3 @@ private: short mId; bool mCanInviteUsers = false; }; - -#endif // PARTY_H diff --git a/src/playerinfo.h b/src/playerinfo.h index cbb6c748..dd7d98fe 100644 --- a/src/playerinfo.h +++ b/src/playerinfo.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PLAYERINFO_H -#define PLAYERINFO_H +#pragma once #include <map> @@ -259,5 +258,3 @@ namespace PlayerInfo void init(); } // namespace PlayerInfo - -#endif diff --git a/src/playerrelations.h b/src/playerrelations.h index 38452c2f..e2ce51d5 100644 --- a/src/playerrelations.h +++ b/src/playerrelations.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PLAYER_RELATIONS_H -#define PLAYER_RELATIONS_H +#pragma once #include <list> #include <map> @@ -201,6 +200,3 @@ private: extern PlayerRelationsManager player_relations; // singleton representation of player relations - - -#endif // PLAYER_RELATIONS_H diff --git a/src/position.h b/src/position.h index c9c8e6f2..7093351d 100644 --- a/src/position.h +++ b/src/position.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef POSITION_H -#define POSITION_H +#pragma once #include <iostream> #include <list> @@ -50,5 +49,3 @@ std::ostream& operator <<(std::ostream &os, const Position &p); * output stream. */ std::ostream& operator <<(std::ostream &os, const Path &path); - -#endif // POSITION_H diff --git a/src/properties.h b/src/properties.h index 7ccf86dc..5a7a19b3 100644 --- a/src/properties.h +++ b/src/properties.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef PROPERTIES_H -#define PROPERTIES_H +#pragma once #include <map> #include <sstream> @@ -140,5 +139,3 @@ class Properties using PropertyMap = std::map<std::string, std::string>; PropertyMap mProperties; }; - -#endif diff --git a/src/resources/action.h b/src/resources/action.h index 37f29810..c3e47dbb 100644 --- a/src/resources/action.h +++ b/src/resources/action.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ACTION_H -#define ACTION_H +#pragma once #include <map> @@ -43,5 +42,3 @@ class Action protected: std::map<int, Animation *> mAnimations; }; - -#endif diff --git a/src/resources/ambientlayer.h b/src/resources/ambientlayer.h index e62af33f..8e0137b1 100644 --- a/src/resources/ambientlayer.h +++ b/src/resources/ambientlayer.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef RESOURCES_AMBIENTOVERLAY_H -#define RESOURCES_AMBIENTOVERLAY_H +#pragma once #include "resource.h" @@ -52,5 +51,3 @@ class AmbientLayer float mPosX = 0; /**< Current layer X position. */ float mPosY = 0; /**< Current layer Y position. */ }; - -#endif diff --git a/src/resources/animation.h b/src/resources/animation.h index 812e0547..01b8b388 100644 --- a/src/resources/animation.h +++ b/src/resources/animation.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ANIMATION_H -#define ANIMATION_H +#pragma once #include <vector> @@ -81,5 +80,3 @@ class Animation final std::vector<Frame> mFrames; int mDuration = 0; }; - -#endif diff --git a/src/resources/attributes.h b/src/resources/attributes.h index 9071d6b8..e70a5435 100644 --- a/src/resources/attributes.h +++ b/src/resources/attributes.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef RESOURCES_ATTRIBUTES_H -#define RESOURCES_ATTRIBUTES_H +#pragma once #include <string> #include <vector> @@ -73,5 +72,3 @@ namespace Attributes unsigned int getAttributeMaximum(); } // namespace Attributes - -#endif // RESOURCES_ATTRIBUTES_H diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h index 2eac4237..fbeec491 100644 --- a/src/resources/beinginfo.h +++ b/src/resources/beinginfo.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef BEINGINFO_H -#define BEINGINFO_H +#pragma once #include "actorsprite.h" #include "map.h" @@ -85,5 +84,3 @@ private: std::map<SoundEvent, std::vector<std::string>> mSounds; std::map<int, Attack> mAttacks; }; - -#endif // BEINGINFO_H diff --git a/src/resources/chardb.h b/src/resources/chardb.h index 10530b26..de49dad6 100644 --- a/src/resources/chardb.h +++ b/src/resources/chardb.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef RESOURCES_CHARDB_H -#define RESOURCES_CHARDB_H +#pragma once #include <vector> @@ -44,5 +43,3 @@ namespace CharDB const std::vector<int> &getDefaultItems(); } - -#endif // RESOURCES_CHARDB_H diff --git a/src/resources/dye.h b/src/resources/dye.h index ce5565f8..61ad4df2 100644 --- a/src/resources/dye.h +++ b/src/resources/dye.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef DYE_H -#define DYE_H +#pragma once #include <string> #include <vector> @@ -97,5 +96,3 @@ class Dye */ DyePalette *mDyePalettes[7]; }; - -#endif diff --git a/src/resources/emotedb.h b/src/resources/emotedb.h index 7c6f4644..0abb62e4 100644 --- a/src/resources/emotedb.h +++ b/src/resources/emotedb.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef EMOTE_DB_H -#define EMOTE_DB_H +#pragma once #include <memory> #include <string> @@ -59,5 +58,3 @@ namespace EmoteDB int getEmoteCount(); } - -#endif // EMOTE_DB_H diff --git a/src/resources/hairdb.h b/src/resources/hairdb.h index 374f2e03..a228c72e 100644 --- a/src/resources/hairdb.h +++ b/src/resources/hairdb.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef HAIR_MANAGER_H -#define HAIR_MANAGER_H +#pragma once #include <map> #include <set> @@ -93,5 +92,3 @@ private: }; extern HairDB hairDB; - -#endif diff --git a/src/resources/image.h b/src/resources/image.h index e2e240c3..37dd5e1d 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef IMAGE_H -#define IMAGE_H +#pragma once #include "resources/resource.h" @@ -216,5 +215,3 @@ class SubImage : public Image private: ResourceRef<Image> mParent; }; - -#endif diff --git a/src/resources/imageset.h b/src/resources/imageset.h index a6501cc9..97dbec90 100644 --- a/src/resources/imageset.h +++ b/src/resources/imageset.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef IMAGESET_H -#define IMAGESET_H +#pragma once #include "resources/resource.h" @@ -78,5 +77,3 @@ class ImageSet : public Resource int mOffsetX = 0; int mOffsetY = 0; }; - -#endif diff --git a/src/resources/imagewriter.h b/src/resources/imagewriter.h index 23e85bd8..41ca267a 100644 --- a/src/resources/imagewriter.h +++ b/src/resources/imagewriter.h @@ -19,6 +19,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#pragma once + #include <iosfwd> struct SDL_Surface; diff --git a/src/resources/itemdb.h b/src/resources/itemdb.h index ef0985a3..8359452c 100644 --- a/src/resources/itemdb.h +++ b/src/resources/itemdb.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ITEM_MANAGER_H -#define ITEM_MANAGER_H +#pragma once #include <list> #include <map> @@ -204,5 +203,3 @@ class ManaServItemDB : public ItemDB } // namespace ManaServ extern ItemDB *itemDb; - -#endif diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 78c808da..42c65c80 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ITEMINFO_H -#define ITEMINFO_H +#pragma once #include "being.h" @@ -162,5 +161,3 @@ enum EquipmentSlot }; } // namespace TmwAthena - -#endif // ITEMINFO_H diff --git a/src/resources/mapreader.h b/src/resources/mapreader.h index 105c5d1d..e646fb04 100644 --- a/src/resources/mapreader.h +++ b/src/resources/mapreader.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MAPREADER_H -#define MAPREADER_H +#pragma once #include "utils/xml.h" @@ -45,5 +44,3 @@ public: */ static Map *readMap(XML::Node node, const std::string &path); }; - -#endif // MAPREADER_H diff --git a/src/resources/monsterdb.h b/src/resources/monsterdb.h index ff709486..ec71952f 100644 --- a/src/resources/monsterdb.h +++ b/src/resources/monsterdb.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MONSTER_DB_H -#define MONSTER_DB_H +#pragma once #include "utils/xml.h" @@ -43,5 +42,3 @@ namespace MonsterDB BeingInfo *get(int id); } - -#endif diff --git a/src/resources/music.h b/src/resources/music.h index 0c445b2b..81dc0d19 100644 --- a/src/resources/music.h +++ b/src/resources/music.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MUSIC_H -#define MUSIC_H +#pragma once #include "resources/resource.h" @@ -61,5 +60,3 @@ class Music : public Resource Mix_Music *mMusic; }; - -#endif diff --git a/src/resources/npcdb.h b/src/resources/npcdb.h index 306167de..779f4919 100644 --- a/src/resources/npcdb.h +++ b/src/resources/npcdb.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef NPC_DB_H -#define NPC_DB_H +#pragma once #include <string> #include "utils/xml.h" @@ -42,5 +41,3 @@ namespace NPCDB BeingInfo *get(int id); } - -#endif diff --git a/src/resources/resource.h b/src/resources/resource.h index e1f37d73..c6b41295 100644 --- a/src/resources/resource.h +++ b/src/resources/resource.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef RESOURCE_H -#define RESOURCE_H +#pragma once #include <ctime> #include <string> @@ -157,5 +156,3 @@ public: private: RESOURCE *mResource; }; - -#endif diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index d1c32d8c..3ce4229b 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef RESOURCE_MANAGER_H -#define RESOURCE_MANAGER_H +#pragma once #include "resources/resource.h" @@ -240,5 +239,3 @@ class ResourceManager std::map<std::string, Resource *> mOrphanedResources; time_t mOldestOrphan; }; - -#endif diff --git a/src/resources/settingsmanager.h b/src/resources/settingsmanager.h index 25feb86b..5b70f865 100644 --- a/src/resources/settingsmanager.h +++ b/src/resources/settingsmanager.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SETTINGSMANAGER_HPP -#define SETTINGSMANAGER_HPP +#pragma once #include <string> #include <list> @@ -30,6 +29,3 @@ namespace SettingsManager void load(); void unload(); } - - -#endif // SETTINGSMANAGER_HPP diff --git a/src/resources/soundeffect.h b/src/resources/soundeffect.h index eada80b5..127b1ce6 100644 --- a/src/resources/soundeffect.h +++ b/src/resources/soundeffect.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SOUND_EFFECT_H -#define SOUND_EFFECT_H +#pragma once #include "resources/resource.h" @@ -61,5 +60,3 @@ class SoundEffect : public Resource Mix_Chunk *mChunk; }; - -#endif // SOUND_EFFECT_H diff --git a/src/resources/specialdb.h b/src/resources/specialdb.h index 20ba0075..c8158a27 100644 --- a/src/resources/specialdb.h +++ b/src/resources/specialdb.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SPECIAL_DB_H -#define SPECIAL_DB_H +#pragma once #include <string> #include "utils/xml.h" @@ -63,5 +62,3 @@ namespace SpecialDB SpecialInfo::TargetMode targetModeFromString(const std::string& str); } - -#endif diff --git a/src/resources/spritedef.h b/src/resources/spritedef.h index fa44deea..0f6e9966 100644 --- a/src/resources/spritedef.h +++ b/src/resources/spritedef.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SPRITEDEF_H -#define SPRITEDEF_H +#pragma once #include "resources/resource.h" @@ -150,5 +149,3 @@ class SpriteDef : public Resource std::map<std::string, ImageSet *> mImageSets; std::map<std::string, Action *> mActions; }; - -#endif // SPRITEDEF_H diff --git a/src/resources/theme.h b/src/resources/theme.h index 7edae416..13491e26 100644 --- a/src/resources/theme.h +++ b/src/resources/theme.h @@ -21,8 +21,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SKIN_H -#define SKIN_H +#pragma once #include "graphics.h" #include "eventlistener.h" @@ -228,5 +227,3 @@ class Theme : public Palette, public EventListener std::vector<DyePalette *> mProgressColors; }; - -#endif diff --git a/src/resources/userpalette.h b/src/resources/userpalette.h index 946a4725..347491f1 100644 --- a/src/resources/userpalette.h +++ b/src/resources/userpalette.h @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef USER_PALETTE_H -#define USER_PALETTE_H +#pragma once #include "gui/palette.h" @@ -185,5 +184,3 @@ class UserPalette : public Palette, public gcn::ListModel }; extern UserPalette *userPalette; - -#endif // USER_PALETTE_H diff --git a/src/resources/wallpaper.h b/src/resources/wallpaper.h index 532dfd38..7e72e2f0 100644 --- a/src/resources/wallpaper.h +++ b/src/resources/wallpaper.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef WALLPAPER_H -#define WALLPAPER_H +#pragma once #include <string> @@ -46,5 +45,3 @@ class Wallpaper */ static std::string getWallpaper(int width, int height); }; - -#endif // WALLPAPER_H diff --git a/src/rotationalparticle.h b/src/rotationalparticle.h index 4ddfa7a9..bc7d1a6d 100644 --- a/src/rotationalparticle.h +++ b/src/rotationalparticle.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef ROTATIONAL_PARTICLE_H -#define ROTATIONAL_PARTICLE_H +#pragma once #include "imageparticle.h" #include "simpleanimation.h" @@ -46,5 +45,3 @@ class RotationalParticle : public ImageParticle private: SimpleAnimation mAnimation; /**< Used animation for this particle */ }; - -#endif diff --git a/src/sdlgraphics.h b/src/sdlgraphics.h index e2d9b5a5..806e86f4 100644 --- a/src/sdlgraphics.h +++ b/src/sdlgraphics.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SDLGRAPHICS_H -#define SDLGRAPHICS_H +#pragma once #include "graphics.h" @@ -87,5 +86,3 @@ private: SDL_Renderer *mRenderer = nullptr; }; - -#endif // SDLGRAPHICS_H diff --git a/src/shopitem.h b/src/shopitem.h index dc1188e0..2bb5cb55 100644 --- a/src/shopitem.h +++ b/src/shopitem.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SHOPITEM_H -#define SHOPITEM_H +#pragma once #include "item.h" @@ -117,5 +116,3 @@ class ShopItem : public Item }; std::stack<DuplicateItem> mDuplicates; /** <-- Stores duplicates */ }; - -#endif diff --git a/src/simpleanimation.h b/src/simpleanimation.h index 33168fd9..63827fcd 100644 --- a/src/simpleanimation.h +++ b/src/simpleanimation.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SIMPLEANIMAION_H -#define SIMPLEANIMAION_H +#pragma once #include "resources/animation.h" @@ -81,5 +80,3 @@ class SimpleAnimation final /** Tell whether the animation is ready */ bool mInitialized = false; }; - -#endif diff --git a/src/sound.h b/src/sound.h index d4d0e8da..9d3aa28e 100644 --- a/src/sound.h +++ b/src/sound.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SOUND_H -#define SOUND_H +#pragma once #include <SDL_mixer.h> @@ -137,5 +136,3 @@ class Sound }; extern Sound sound; - -#endif diff --git a/src/sprite.h b/src/sprite.h index d7f5f1d7..80076f99 100644 --- a/src/sprite.h +++ b/src/sprite.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SPRITE_H -#define SPRITE_H +#pragma once #include "resources/spritedef.h" @@ -116,5 +115,3 @@ class Sprite protected: float mAlpha = 1.0f; /**< The alpha opacity used to draw */ }; - -#endif // SPRITE_H diff --git a/src/statuseffect.h b/src/statuseffect.h index 05b80e6b..e383a24b 100644 --- a/src/statuseffect.h +++ b/src/statuseffect.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef STATUS_EFFECT_H -#define STATUS_EFFECT_H +#pragma once #include "particle.h" #include "animatedsprite.h" @@ -111,5 +110,3 @@ private: std::string mAction; bool mPersistentParticleEffect = false; }; - -#endif // !defined(STATUS_EFFECT_H) @@ -20,8 +20,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TEXT_H -#define TEXT_H +#pragma once #include "graphics.h" @@ -99,5 +98,3 @@ class FlashText : public Text private: Timer mTimer; /**< Time left for flashing */ }; - -#endif // TEXT_H diff --git a/src/textmanager.h b/src/textmanager.h index f736e87c..c4d38d82 100644 --- a/src/textmanager.h +++ b/src/textmanager.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TEXTMANAGER_H -#define TEXTMANAGER_H +#pragma once #include <list> @@ -69,5 +68,3 @@ class TextManager }; extern TextManager *textManager; - -#endif // TEXTMANAGER_H diff --git a/src/textparticle.h b/src/textparticle.h index d70cc5b9..89a8e90c 100644 --- a/src/textparticle.h +++ b/src/textparticle.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TEXTPARTICLE_H -#define TEXTPARTICLE_H +#pragma once #include "particle.h" @@ -53,5 +52,3 @@ class TextParticle : public Particle const gcn::Color *mColor; /**< Color used for drawing the text. */ bool mOutline; /**< Make the text better readable */ }; - -#endif diff --git a/src/textrenderer.h b/src/textrenderer.h index d402e146..a646b2f5 100644 --- a/src/textrenderer.h +++ b/src/textrenderer.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TEXT_RENDERER_H -#define TEXT_RENDERER_H +#pragma once #include "graphics.h" @@ -82,5 +81,3 @@ public: graphics->drawText(text, x, y, align); } }; - -#endif diff --git a/src/tileset.h b/src/tileset.h index 4ba9f016..daf8faf3 100644 --- a/src/tileset.h +++ b/src/tileset.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef TILESET_H -#define TILESET_H +#pragma once #include "resources/imageset.h" @@ -48,5 +47,3 @@ class Tileset : public ImageSet private: unsigned mFirstGid; }; - -#endif // TILESET_H diff --git a/src/units.h b/src/units.h index eb6b6712..2a4bd458 100644 --- a/src/units.h +++ b/src/units.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef UNITS_H -#define UNITS_H +#pragma once #include <string> #include "utils/xml.h" @@ -44,5 +43,3 @@ class Units */ static std::string formatWeight(int value); }; - -#endif // UNITS_H diff --git a/src/utils/base64.h b/src/utils/base64.h index 92c23016..8fc7e79f 100644 --- a/src/utils/base64.h +++ b/src/utils/base64.h @@ -27,10 +27,7 @@ +----------------------------------------------------------------------+ */ -#ifndef BASE64_H -#define BASE64_H +#pragma once extern unsigned char *php3_base64_encode(const unsigned char *, int, int *); extern unsigned char *php3_base64_decode(const unsigned char *, int, int *); - -#endif /* BASE64_H */ diff --git a/src/utils/copynpaste.h b/src/utils/copynpaste.h index b6aa0de0..83e48891 100644 --- a/src/utils/copynpaste.h +++ b/src/utils/copynpaste.h @@ -18,6 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#pragma once + #include <string> /** diff --git a/src/utils/dtor.h b/src/utils/dtor.h index 76c68725..79b374d0 100644 --- a/src/utils/dtor.h +++ b/src/utils/dtor.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef UTILS_DTOR_H -#define UTILS_DTOR_H +#pragma once #include <algorithm> #include <utility> @@ -48,5 +47,3 @@ inline void delete_all(Container &c) { std::for_each(c.begin(), c.end(), make_dtor(c)); } - -#endif diff --git a/src/utils/gettext.h b/src/utils/gettext.h index f3b12ada..1f40a4be 100644 --- a/src/utils/gettext.h +++ b/src/utils/gettext.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef UTILS_GETTEXT_H -#define UTILS_GETTEXT_H +#pragma once #ifdef HAVE_CONFIG_H #include "config.h" @@ -40,5 +39,3 @@ #define N_(s) ((char const *)s) #endif - -#endif // UTILS_GETTEXT_H diff --git a/src/utils/mathutils.h b/src/utils/mathutils.h index 21eba16f..0a169df5 100644 --- a/src/utils/mathutils.h +++ b/src/utils/mathutils.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef UTILS_MATHUTILS_H -#define UTILS_MATHUTILS_H +#pragma once /* A very fast function to calculate the approximate inverse square root of a * floating point value and a helper function that uses it for getting the @@ -57,5 +56,3 @@ inline float weightedAverage(float n1, float n2, float w) return w * n2 + (1.0f - w) * n1; } - -#endif // UTILS_MATHUTILS_H diff --git a/src/utils/mkdir.h b/src/utils/mkdir.h index 3bd76145..817c79df 100644 --- a/src/utils/mkdir.h +++ b/src/utils/mkdir.h @@ -18,9 +18,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MKDIR_H -#define MKDIR_H +#pragma once int mkdir_r(const char *pathname); - -#endif diff --git a/src/utils/mutex.h b/src/utils/mutex.h index b4661c70..3e01eb76 100644 --- a/src/utils/mutex.h +++ b/src/utils/mutex.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MUTEX_H -#define MUTEX_H +#pragma once #include "log.h" @@ -103,5 +102,3 @@ inline MutexLocker::~MutexLocker() if (mMutex) mMutex->unlock(); } - -#endif // MUTEX_H diff --git a/src/utils/path.h b/src/utils/path.h index 5338c74e..0b7019eb 100644 --- a/src/utils/path.h +++ b/src/utils/path.h @@ -18,8 +18,7 @@ * along with The Mana Server. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef UTILS_PATH_H -#define UTILS_PATH_H +#pragma once #include <string> @@ -29,5 +28,3 @@ namespace utils std::string joinPaths(std::string_view path1, std::string_view path2); std::string cleanPath(const std::string &path); } - -#endif // UTILS_PATH_H diff --git a/src/utils/sha256.h b/src/utils/sha256.h index 8a9c2b70..6c2c3107 100644 --- a/src/utils/sha256.h +++ b/src/utils/sha256.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef UTILS_SHA256_H -#define UTILS_SHA256_H +#pragma once #include <string> @@ -31,5 +30,3 @@ * @return the SHA-256 hash for the given string. */ std::string sha256(const std::string &string); - -#endif // UTILS_SHA256_H diff --git a/src/utils/specialfolder.h b/src/utils/specialfolder.h index 36a4e0c1..9e069310 100644 --- a/src/utils/specialfolder.h +++ b/src/utils/specialfolder.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef SPECIALFOLDER_H -#define SPECIALFOLDER_H +#pragma once #ifdef _WIN32 #include <shlobj.h> @@ -31,5 +30,3 @@ std::string getSpecialFolderLocation(const KNOWNFOLDERID &folderId); #include <string> std::string getResourcesLocation(); #endif - -#endif diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h index e7ff1332..8781a9c4 100644 --- a/src/utils/stringutils.h +++ b/src/utils/stringutils.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef UTILS_STRINGUTILS_H -#define UTILS_STRINGUTILS_H +#pragma once #include <optional> #include <sstream> @@ -221,5 +220,3 @@ std::string getHostNameFromURL(const std::string &url); * separator. */ std::string join(const std::vector<std::string> &strings, const char *separator); - -#endif // UTILS_STRINGUTILS_H diff --git a/src/utils/time.h b/src/utils/time.h index 58b8164a..590041e3 100644 --- a/src/utils/time.h +++ b/src/utils/time.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #ifndef UTILS_TIME_H - #define UTILS_TIME_H +#pragma once #include <cstdint> @@ -107,5 +106,3 @@ public: private: uint32_t mTimeout = 0; }; - -#endif // UTILS_TIME_H diff --git a/src/utils/xml.h b/src/utils/xml.h index 13c06988..787504bb 100644 --- a/src/utils/xml.h +++ b/src/utils/xml.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef XML_H -#define XML_H +#pragma once #include "utils/stringutils.h" @@ -295,5 +294,3 @@ namespace XML xmlTextWriterWriteString(mWriter, BAD_CAST text.c_str()); } } - -#endif // XML_H diff --git a/src/utils/zlib.h b/src/utils/zlib.h index 53dfd613..74853bd6 100644 --- a/src/utils/zlib.h +++ b/src/utils/zlib.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef UTILS_ZLIB_H -#define UTILS_ZLIB_H +#pragma once #include <string> @@ -44,5 +43,3 @@ int inflateMemory(unsigned char *in, unsigned int inLength, * uncompressed, or <code>NULL</code> on fail. */ void *loadCompressedFile(const std::string &filename, int &filesize); - -#endif // UTILS_ZLIB_H diff --git a/src/variabledata.h b/src/variabledata.h index 4135e115..4f6695a7 100644 --- a/src/variabledata.h +++ b/src/variabledata.h @@ -18,8 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef VARIABLEDATA_H -#define VARIABLEDATA_H +#pragma once #include <string> @@ -122,5 +121,3 @@ public: private: ActorSprite *mData; }; - -#endif diff --git a/src/vector.h b/src/vector.h index 6bf6d81a..142bb077 100644 --- a/src/vector.h +++ b/src/vector.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef VECTOR_H -#define VECTOR_H +#pragma once #include <cmath> @@ -183,5 +182,3 @@ inline bool operator == (const Vector &a, const Vector &b) * Appends a string representation of a vector to the output stream. */ std::ostream& operator <<(std::ostream &os, const Vector &v); - -#endif // VECTOR_H diff --git a/src/video.h b/src/video.h index c98434e6..47aed627 100644 --- a/src/video.h +++ b/src/video.h @@ -19,8 +19,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef VIDEO_H -#define VIDEO_H +#pragma once #include "graphics.h" @@ -113,5 +112,3 @@ private: std::unique_ptr<Graphics> mGraphics; SDL_Window *mWindow = nullptr; }; - -#endif // VIDEO_H |