diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-01-21 10:34:13 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-01-21 10:59:47 +0100 |
commit | 6fff2b7cc37c35b38401018ed9f557ea2bd959fb (patch) | |
tree | 31dc4c6eb793964532e27dd5bbabaf95dd9b2bdf /src/resources | |
parent | 894eeb76c42ebcf0dc1be9da735f47543c7f6a3a (diff) | |
download | mana-master.tar.gz mana-master.tar.bz2 mana-master.tar.xz mana-master.zip |
Thanks to https://github.com/cgmb/guardonce and a follow-up replace to
remove duplicated newlines at end of file:
find src -type f -name '*.h' -exec \
sed --in-place -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \;
Source: https://unix.stackexchange.com/questions/81685/how-to-remove-multiple-newlines-at-eof
Fixes compile on macOS, which appears to have been due to the EVENT_H
include guard.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/action.h | 5 | ||||
-rw-r--r-- | src/resources/ambientlayer.h | 5 | ||||
-rw-r--r-- | src/resources/animation.h | 5 | ||||
-rw-r--r-- | src/resources/attributes.h | 5 | ||||
-rw-r--r-- | src/resources/beinginfo.h | 5 | ||||
-rw-r--r-- | src/resources/chardb.h | 5 | ||||
-rw-r--r-- | src/resources/dye.h | 5 | ||||
-rw-r--r-- | src/resources/emotedb.h | 5 | ||||
-rw-r--r-- | src/resources/hairdb.h | 5 | ||||
-rw-r--r-- | src/resources/image.h | 5 | ||||
-rw-r--r-- | src/resources/imageset.h | 5 | ||||
-rw-r--r-- | src/resources/imagewriter.h | 2 | ||||
-rw-r--r-- | src/resources/itemdb.h | 5 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 5 | ||||
-rw-r--r-- | src/resources/mapreader.h | 5 | ||||
-rw-r--r-- | src/resources/monsterdb.h | 5 | ||||
-rw-r--r-- | src/resources/music.h | 5 | ||||
-rw-r--r-- | src/resources/npcdb.h | 5 | ||||
-rw-r--r-- | src/resources/resource.h | 5 | ||||
-rw-r--r-- | src/resources/resourcemanager.h | 5 | ||||
-rw-r--r-- | src/resources/settingsmanager.h | 6 | ||||
-rw-r--r-- | src/resources/soundeffect.h | 5 | ||||
-rw-r--r-- | src/resources/specialdb.h | 5 | ||||
-rw-r--r-- | src/resources/spritedef.h | 5 | ||||
-rw-r--r-- | src/resources/theme.h | 5 | ||||
-rw-r--r-- | src/resources/userpalette.h | 5 | ||||
-rw-r--r-- | src/resources/wallpaper.h | 5 |
27 files changed, 28 insertions, 105 deletions
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 |