From 800aa07da876b16e4151c37a124f2822d41d70bd Mon Sep 17 00:00:00 2001 From: lifehackerhansol Date: Fri, 4 Oct 2024 22:59:31 -0700 Subject: [PATCH] treewide: use pragma once --- arm9/source/animation.h | 5 +---- arm9/source/bigclock.h | 5 +---- arm9/source/bmp15.h | 5 +---- arm9/source/calendar.h | 5 +---- arm9/source/calendarwnd.h | 5 +---- arm9/source/cheatwnd.h | 5 +---- arm9/source/datetime.h | 5 +---- arm9/source/dbgtool.h | 5 +---- arm9/source/diskicon.h | 5 +---- arm9/source/dsrom.h | 5 +---- arm9/source/exptools.h | 5 +---- arm9/source/expwnd.h | 5 +---- arm9/source/favorites.h | 5 +---- arm9/source/fileicons.h | 5 +---- arm9/source/flags.h | 5 +---- arm9/source/font/font.h | 5 +---- arm9/source/font/font_pcf.h | 5 +---- arm9/source/font/font_pcf_internals.h | 5 +---- arm9/source/gamecode.h | 5 +---- arm9/source/gbaloader.h | 5 +---- arm9/source/gbapatcher.h | 5 +---- arm9/source/gdi.h | 5 +---- arm9/source/globalsettings.h | 5 +---- arm9/source/helpwnd.h | 5 +---- arm9/source/icons.h | 5 +---- arm9/source/inifile.h | 5 +---- arm9/source/irqs.h | 5 +---- arm9/source/language.h | 5 +---- arm9/source/mainlist.h | 5 +---- arm9/source/mainwnd.h | 5 +---- arm9/source/rominfownd.h | 5 +---- arm9/source/romlauncher.h | 5 +---- arm9/source/romloader.h | 5 +---- arm9/source/savemngr.h | 5 +---- arm9/source/settingwnd.h | 5 +---- arm9/source/singleton.h | 5 +---- arm9/source/sprite.h | 5 +---- arm9/source/sram.h | 5 +---- arm9/source/startmenu.h | 5 +---- arm9/source/stringtool.h | 5 +---- arm9/source/systemfilenames.h | 5 +---- arm9/source/testcases.h | 5 +---- arm9/source/timer.h | 5 +---- arm9/source/timetool.h | 5 +---- arm9/source/ui/binaryfind.h | 5 +---- arm9/source/ui/bitmapdesc.h | 5 +---- arm9/source/ui/button.h | 5 +---- arm9/source/ui/form.h | 5 +---- arm9/source/ui/formdesc.h | 5 +---- arm9/source/ui/keymessage.h | 5 +---- arm9/source/ui/listview.h | 4 +--- arm9/source/ui/message.h | 5 +---- arm9/source/ui/msgbox.h | 5 +---- arm9/source/ui/point.h | 5 +---- arm9/source/ui/popmenu.h | 4 +--- arm9/source/ui/progressbar.h | 5 +---- arm9/source/ui/progresswnd.h | 5 +---- arm9/source/ui/rectangle.h | 5 +---- arm9/source/ui/renderdesc.h | 4 +--- arm9/source/ui/sigslot.h | 5 +---- arm9/source/ui/spinbox.h | 5 +---- arm9/source/ui/statictext.h | 5 +---- arm9/source/ui/touchmessage.h | 5 +---- arm9/source/ui/ui.h | 5 +---- arm9/source/ui/uisettings.h | 5 +---- arm9/source/ui/window.h | 4 +--- arm9/source/ui/windowmanager.h | 5 +---- arm9/source/unicode.h | 5 +---- arm9/source/userinput.h | 5 +---- arm9/source/userwnd.h | 5 +---- arm9/source/zoomingicon.h | 5 +---- share/fifotool.h | 5 +---- share/memtool.h | 5 +---- 73 files changed, 73 insertions(+), 288 deletions(-) diff --git a/arm9/source/animation.h b/arm9/source/animation.h index 2e708ea..8f478a8 100644 --- a/arm9/source/animation.h +++ b/arm9/source/animation.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _ANIMATION_H_ -#define _ANIMATION_H_ +#pragma once #include "ui.h" @@ -65,5 +64,3 @@ typedef t_singleton animationManager_s; inline cAnimationManager& animationManager() { return animationManager_s::instance(); } - -#endif //_ANIMATION_H_ diff --git a/arm9/source/bigclock.h b/arm9/source/bigclock.h index f5deb5e..2c09ef5 100644 --- a/arm9/source/bigclock.h +++ b/arm9/source/bigclock.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _BIGCLOCK_H_ -#define _BIGCLOCK_H_ +#pragma once #include "bmp15.h" #include "datetime.h" @@ -61,5 +60,3 @@ typedef t_singleton bigClock_s; inline cBigClock& bigClock() { return bigClock_s::instance(); } - -#endif //_BIGCLOCK_H_ diff --git a/arm9/source/bmp15.h b/arm9/source/bmp15.h index 788d716..35dbb81 100644 --- a/arm9/source/bmp15.h +++ b/arm9/source/bmp15.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _BMP15_H_ -#define _BMP15_H_ +#pragma once #include #include @@ -64,5 +63,3 @@ cBMP15 createBMP15FromFile(const std::string& filename); cBMP15 createBMP15FromMem(void* mem); // void destroyBMP15( cBMP15 * bmp ); // void destroyBMP15ByFilename( const char * filename ); - -#endif //_BMP15_H_ diff --git a/arm9/source/calendar.h b/arm9/source/calendar.h index 4306534..61ab51f 100644 --- a/arm9/source/calendar.h +++ b/arm9/source/calendar.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _CALENDAR_H_ -#define _CALENDAR_H_ +#pragma once #include "bmp15.h" #include "datetime.h" @@ -68,5 +67,3 @@ typedef t_singleton calendar_s; inline cCalendar& calendar() { return calendar_s::instance(); } - -#endif //_CALENDAR_H_ diff --git a/arm9/source/calendarwnd.h b/arm9/source/calendarwnd.h index d5b0216..80b2af3 100644 --- a/arm9/source/calendarwnd.h +++ b/arm9/source/calendarwnd.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _CALENDARWND_H_ -#define _CALENDARWND_H_ +#pragma once #include #include "form.h" @@ -46,5 +45,3 @@ typedef t_singleton calendarWnd_s; inline cCalendarWnd& calendarWnd() { return calendarWnd_s::instance(); } - -#endif //_CALENDARWND_H_ diff --git a/arm9/source/cheatwnd.h b/arm9/source/cheatwnd.h index 101ef01..af8330f 100644 --- a/arm9/source/cheatwnd.h +++ b/arm9/source/cheatwnd.h @@ -16,8 +16,7 @@ along with this program. If not, see . */ -#ifndef __CHEATWND_H__ -#define __CHEATWND_H__ +#pragma once #include "button.h" #include "form.h" @@ -92,5 +91,3 @@ class cCheatWnd : public akui::cForm { std::vector _indexes; std::string _fileName; }; - -#endif diff --git a/arm9/source/datetime.h b/arm9/source/datetime.h index 66b0ca2..20316e3 100644 --- a/arm9/source/datetime.h +++ b/arm9/source/datetime.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _DATETIME_H_ -#define _DATETIME_H_ +#pragma once #include #include @@ -57,5 +56,3 @@ typedef t_singleton dateTime_s; inline cDateTime& datetime() { return dateTime_s::instance(); } - -#endif //_DATETIME_H_ diff --git a/arm9/source/dbgtool.h b/arm9/source/dbgtool.h index 79aa6cc..ccd317e 100644 --- a/arm9/source/dbgtool.h +++ b/arm9/source/dbgtool.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _DBG_TOOL_H_ -#define _DBG_TOOL_H_ +#pragma once #include #include @@ -70,5 +69,3 @@ static inline void wait_press_b() { #else #define wait_press_b() #endif // DEBUG - -#endif //_DBG_TOOL_H_ diff --git a/arm9/source/diskicon.h b/arm9/source/diskicon.h index b0dd6b4..ffe9ccd 100644 --- a/arm9/source/diskicon.h +++ b/arm9/source/diskicon.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _DISKICON_H_ -#define _DISKICON_H_ +#pragma once #include #include "singleton.h" @@ -55,5 +54,3 @@ typedef t_singleton diskIcon_s; inline cDiskIcon& diskIcon() { return diskIcon_s::instance(); } - -#endif //_DISKIOICON_H_ diff --git a/arm9/source/dsrom.h b/arm9/source/dsrom.h index d25f98e..a6caf53 100644 --- a/arm9/source/dsrom.h +++ b/arm9/source/dsrom.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _DSROM_H_ -#define _DSROM_H_ +#pragma once #include #include @@ -76,5 +75,3 @@ class DSRomInfo { }; void setBanner(const std::string& anExtIcon, const u8* aBanner); }; - -#endif //_DSROM_H_ diff --git a/arm9/source/exptools.h b/arm9/source/exptools.h index 1293766..686e44e 100644 --- a/arm9/source/exptools.h +++ b/arm9/source/exptools.h @@ -17,8 +17,7 @@ along with this program. If not, see . */ -#ifndef __EXPTOOLS_H__ -#define __EXPTOOLS_H__ +#pragma once #include #include "singleton.h" @@ -71,5 +70,3 @@ typedef t_singleton cExpansion_s; inline cExpansion& expansion() { return cExpansion_s::instance(); } - -#endif diff --git a/arm9/source/expwnd.h b/arm9/source/expwnd.h index 7566849..1b85489 100644 --- a/arm9/source/expwnd.h +++ b/arm9/source/expwnd.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef __EXPWND_H__ -#define __EXPWND_H__ +#pragma once #include #include "dsrom.h" @@ -55,5 +54,3 @@ class cExpWnd : public akui::cForm { akui::cFormDesc _renderDesc; std::string _romName; }; - -#endif //_HELPWND_H_ diff --git a/arm9/source/favorites.h b/arm9/source/favorites.h index 33b4bf3..468667f 100644 --- a/arm9/source/favorites.h +++ b/arm9/source/favorites.h @@ -17,8 +17,7 @@ along with this program. If not, see . */ -#ifndef __FAVORITES_H__ -#define __FAVORITES_H__ +#pragma once #include @@ -28,5 +27,3 @@ class cFavorites { static bool UpdateFavorites(const std::string& aOldFileName, const std::string& aNewFileName); static bool RemoveFromFavorites(const std::string& aFileName); }; - -#endif diff --git a/arm9/source/fileicons.h b/arm9/source/fileicons.h index 93453d9..7c46a87 100644 --- a/arm9/source/fileicons.h +++ b/arm9/source/fileicons.h @@ -16,8 +16,7 @@ along with this program. If not, see . */ -#ifndef __FILEICONS_H__ -#define __FILEICONS_H__ +#pragma once #include #include @@ -63,5 +62,3 @@ typedef t_singleton fileIcons_s; inline cFileIcons& fileIcons() { return fileIcons_s::instance(); } - -#endif diff --git a/arm9/source/flags.h b/arm9/source/flags.h index 2f16c93..378789f 100644 --- a/arm9/source/flags.h +++ b/arm9/source/flags.h @@ -17,8 +17,7 @@ along with this program. If not, see . */ -#ifndef __FLAGS_H__ -#define __FLAGS_H__ +#pragma once #include @@ -36,5 +35,3 @@ #define PATCH_LANGUAGE_MASK 0x0000e000 #define PATCH_LANGUAGE_SHIFT 13 //#define PATCH_NEXT BIT(16) - -#endif diff --git a/arm9/source/font/font.h b/arm9/source/font/font.h index e7faff3..ae630ad 100644 --- a/arm9/source/font/font.h +++ b/arm9/source/font/font.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _FONT_H_ -#define _FONT_H_ +#pragma once #include #include "gdi.h" @@ -40,5 +39,3 @@ class cFont { virtual bool Load(const char* aFileName) = 0; virtual u32 FontRAM(void); }; - -#endif //_FONT_H_ diff --git a/arm9/source/font/font_pcf.h b/arm9/source/font/font_pcf.h index 2ce9ddf..05e3075 100644 --- a/arm9/source/font/font_pcf.h +++ b/arm9/source/font/font_pcf.h @@ -22,8 +22,7 @@ supported only fonts with ... */ -#ifndef __FONT_PCF_H__ -#define __FONT_PCF_H__ +#pragma once #include "font.h" @@ -81,5 +80,3 @@ class cFontPcf : public cFont { void Info(const char* aString, u32* aWidth, u32* aSymbolCount); u32 FontRAM(void); }; - -#endif diff --git a/arm9/source/font/font_pcf_internals.h b/arm9/source/font/font_pcf_internals.h index 67412b1..bfa67f5 100644 --- a/arm9/source/font/font_pcf_internals.h +++ b/arm9/source/font/font_pcf_internals.h @@ -17,8 +17,7 @@ along with this program. If not, see . */ -#ifndef __FONT_PCF_INTERNALS_H__ -#define __FONT_PCF_INTERNALS_H__ +#pragma once #include @@ -84,5 +83,3 @@ struct SPcfAccel { u32 iFontDescent; u32 iMaxOverlap; }; - -#endif diff --git a/arm9/source/gamecode.h b/arm9/source/gamecode.h index 8f2ec02..034a506 100644 --- a/arm9/source/gamecode.h +++ b/arm9/source/gamecode.h @@ -16,13 +16,10 @@ along with this program. If not, see . */ -#ifndef __GAMECODE_H__ -#define __GAMECODE_H__ +#pragma once inline u32 gamecode(const char* aGameCode) { u32 gameCode; memcpy(&gameCode, aGameCode, sizeof(gameCode)); return gameCode; } - -#endif diff --git a/arm9/source/gbaloader.h b/arm9/source/gbaloader.h index 85dae47..338c906 100644 --- a/arm9/source/gbaloader.h +++ b/arm9/source/gbaloader.h @@ -17,8 +17,7 @@ along with this program. If not, see . */ -#ifndef __GBALOADER_H__ -#define __GBALOADER_H__ +#pragma once #include #include @@ -46,5 +45,3 @@ class CGbaLoader { static bool CheckPSRAM(u32 aSize); static void StartGBA(void); }; - -#endif diff --git a/arm9/source/gbapatcher.h b/arm9/source/gbapatcher.h index 89cc120..fdea6a8 100644 --- a/arm9/source/gbapatcher.h +++ b/arm9/source/gbapatcher.h @@ -17,8 +17,7 @@ along with this program. If not, see . */ -#ifndef __GBAPATCHER_H__ -#define __GBAPATCHER_H__ +#pragma once #include #include @@ -148,5 +147,3 @@ class CGbaPatcher { return iResultSize; }; }; - -#endif diff --git a/arm9/source/gdi.h b/arm9/source/gdi.h index 0e081e0..86aa5eb 100644 --- a/arm9/source/gdi.h +++ b/arm9/source/gdi.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _GDI_H_ -#define _GDI_H_ +#pragma once #include #include @@ -143,5 +142,3 @@ typedef t_singleton cGdi_s; inline cGdi& gdi() { return cGdi_s::instance(); } - -#endif //_GDI_H_ diff --git a/arm9/source/globalsettings.h b/arm9/source/globalsettings.h index 229fe12..f3ee8ee 100644 --- a/arm9/source/globalsettings.h +++ b/arm9/source/globalsettings.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _GLOBALSETTINGS_H_ -#define _GLOBALSETTINGS_H_ +#pragma once #include #include @@ -79,5 +78,3 @@ typedef t_singleton globalSettings_s; inline cGlobalSettings& gs() { return globalSettings_s::instance(); } - -#endif //_GLOBALSETTINGS_H_ diff --git a/arm9/source/helpwnd.h b/arm9/source/helpwnd.h index 723b949..fb02865 100644 --- a/arm9/source/helpwnd.h +++ b/arm9/source/helpwnd.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _HELPWND_H_ -#define _HELPWND_H_ +#pragma once #include #include "dsrom.h" @@ -55,5 +54,3 @@ class cHelpWnd : public akui::cForm { std::string _helpText; }; - -#endif //_HELPWND_H_ diff --git a/arm9/source/icons.h b/arm9/source/icons.h index ae3d772..31944ab 100644 --- a/arm9/source/icons.h +++ b/arm9/source/icons.h @@ -16,8 +16,7 @@ along with this program. If not, see . */ -#ifndef __ICONS_H__ -#define __ICONS_H__ +#pragma once #include @@ -25,5 +24,3 @@ class cIcons { public: static void maskBlt(const u16* aSrc, u16* aDst); }; - -#endif diff --git a/arm9/source/inifile.h b/arm9/source/inifile.h index 5eb23ff..7b4a119 100644 --- a/arm9/source/inifile.h +++ b/arm9/source/inifile.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _INIFILE_H_ -#define _INIFILE_H_ +#pragma once #include #include @@ -66,5 +65,3 @@ class CIniFile { std::string GetString(const std::string& Section, const std::string& Item); int GetInt(const std::string& Section, const std::string& Item); }; - -#endif // _INIFILE_H_ diff --git a/arm9/source/irqs.h b/arm9/source/irqs.h index d637c14..ed755ed 100644 --- a/arm9/source/irqs.h +++ b/arm9/source/irqs.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _IRQS_H_ -#define _IRQS_H_ +#pragma once #include #include "singleton.h" @@ -49,5 +48,3 @@ typedef t_singleton irq_s; inline cIRQ& irq() { return irq_s::instance(); } - -#endif //_IRQS_H_ diff --git a/arm9/source/language.h b/arm9/source/language.h index b6a09d4..67526af 100644 --- a/arm9/source/language.h +++ b/arm9/source/language.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _LANGUAGE_H_ -#define _LANGUAGE_H_ +#pragma once #include "dbgtool.h" #include "globalsettings.h" @@ -45,5 +44,3 @@ inline cLanguageFile& lang() { #define LANG(i, t) lang().GetString(i, t, t) bool stringComp(const std::string& item1, const std::string& item2); - -#endif //_LANGUAGE_H_ diff --git a/arm9/source/mainlist.h b/arm9/source/mainlist.h index 72527ee..ecf1721 100644 --- a/arm9/source/mainlist.h +++ b/arm9/source/mainlist.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _MAINLIST_H_ -#define _MAINLIST_H_ +#pragma once #include #include "dsrom.h" @@ -134,5 +133,3 @@ class cMainList : public akui::cListView { public: u32 Slot2(void) { return _topSlot2; } }; - -#endif //_MAINLIST_H_ diff --git a/arm9/source/mainwnd.h b/arm9/source/mainwnd.h index f2f2c04..d9a48fa 100644 --- a/arm9/source/mainwnd.h +++ b/arm9/source/mainwnd.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _MAINWND_H_ -#define _MAINWND_H_ +#pragma once #include "button.h" #include "form.h" @@ -98,5 +97,3 @@ class cMainWnd : public akui::cForm { bool _processL; }; - -#endif //_MAINWND_H_ diff --git a/arm9/source/rominfownd.h b/arm9/source/rominfownd.h index 3cdc6a0..54bb0d2 100644 --- a/arm9/source/rominfownd.h +++ b/arm9/source/rominfownd.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _ROMINFOWND_H_ -#define _ROMINFOWND_H_ +#pragma once #include #include "dsrom.h" @@ -104,5 +103,3 @@ class cRomInfoWnd : public akui::cForm { const std::vector* _saves; }; - -#endif //_ROMINFOWND_H_ diff --git a/arm9/source/romlauncher.h b/arm9/source/romlauncher.h index ebb8b3f..4e04961 100644 --- a/arm9/source/romlauncher.h +++ b/arm9/source/romlauncher.h @@ -16,8 +16,7 @@ along with this program. If not, see . */ -#ifndef __ROMLAUNCHER_H__ -#define __ROMLAUNCHER_H__ +#pragma once #include "dsrom.h" @@ -31,5 +30,3 @@ enum TLaunchResult { TLaunchResult launchRom(const std::string& aFullPath, DSRomInfo& aRomInfo, bool aMenu); void autoLaunchRom(const std::string& aFullPath); - -#endif diff --git a/arm9/source/romloader.h b/arm9/source/romloader.h index a425f60..4e92f63 100644 --- a/arm9/source/romloader.h +++ b/arm9/source/romloader.h @@ -18,13 +18,10 @@ along with this program. If not, see . */ -#ifndef _ROMLOADER_H_ -#define _ROMLOADER_H_ +#pragma once #include #include bool loadRom(const std::string& filename, const std::string& savename, u32 flags, long cheatOffset, size_t cheatSize); - -#endif //_ROMLOADER_H_ diff --git a/arm9/source/savemngr.h b/arm9/source/savemngr.h index 517c397..7d84254 100644 --- a/arm9/source/savemngr.h +++ b/arm9/source/savemngr.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _SAVEMNGR_H_ -#define _SAVEMNGR_H_ +#pragma once #include #include @@ -239,5 +238,3 @@ typedef t_singleton SaveManager_s; inline cSaveManager& saveManager() { return SaveManager_s::instance(); } - -#endif //_SAVEMNGR_H_ diff --git a/arm9/source/settingwnd.h b/arm9/source/settingwnd.h index f83ed3a..d925970 100644 --- a/arm9/source/settingwnd.h +++ b/arm9/source/settingwnd.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _SETTINGWND_H_ -#define _SETTINGWND_H_ +#pragma once #include #include "form.h" @@ -98,5 +97,3 @@ class cSettingWnd : public akui::cForm { akui::cFormDesc _renderDesc; akui::cButton _buttonY; }; - -#endif //_SETTINGWND_H_ diff --git a/arm9/source/singleton.h b/arm9/source/singleton.h index 85a6696..621d4e3 100644 --- a/arm9/source/singleton.h +++ b/arm9/source/singleton.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _SINGLETON_H_ -#define _SINGLETON_H_ +#pragma once #include template @@ -55,5 +54,3 @@ class t_singleton { template T* t_singleton::_instance = NULL; - -#endif //_AGL_SINGLETON_H_ diff --git a/arm9/source/sprite.h b/arm9/source/sprite.h index 0c775a6..69be809 100644 --- a/arm9/source/sprite.h +++ b/arm9/source/sprite.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _SPRITE_H_ -#define _SPRITE_H_ +#pragma once #include @@ -87,5 +86,3 @@ class cSprite { // void destroySprite( cSprite * pointer ); // // }; - -#endif //_SPRITE_H_ diff --git a/arm9/source/sram.h b/arm9/source/sram.h index 8cdf2d3..196f571 100644 --- a/arm9/source/sram.h +++ b/arm9/source/sram.h @@ -17,8 +17,7 @@ along with this program. If not, see . */ -#ifndef __SRAM_H__ -#define __SRAM_H__ +#pragma once #include #include @@ -52,5 +51,3 @@ class cSram { static void BlankSram(u16 aStartPage); static void NormalizeSize(sSaveInfo& anInfo); }; - -#endif diff --git a/arm9/source/startmenu.h b/arm9/source/startmenu.h index f5e3217..776baff 100644 --- a/arm9/source/startmenu.h +++ b/arm9/source/startmenu.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _STARTMENU_H_ -#define _STARTMENU_H_ +#pragma once #include "popmenu.h" @@ -41,5 +40,3 @@ class cStartMenu : public akui::cPopMenu { cWindow& loadAppearance(const std::string& aFileName); }; - -#endif //_STARTMENU_H_ diff --git a/arm9/source/stringtool.h b/arm9/source/stringtool.h index f37e8eb..08118fb 100644 --- a/arm9/source/stringtool.h +++ b/arm9/source/stringtool.h @@ -24,11 +24,8 @@ THE SOFTWARE. ---------------------------------------------------------------------------------*/ -#ifndef _STRINGTOOL_H_ -#define _STRINGTOOL_H_ +#pragma once #include std::string formatString(const char* fmt, ...); - -#endif //_STRINGTOOL_H_ diff --git a/arm9/source/systemfilenames.h b/arm9/source/systemfilenames.h index 5736d0f..7e8b35c 100644 --- a/arm9/source/systemfilenames.h +++ b/arm9/source/systemfilenames.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _SYSTEMFILENAMES_H_ -#define _SYSTEMFILENAMES_H_ +#pragma once #define SFN_SYSTEM_DIR "fat:/__rpg/" #define SFN_OFFICIAL_SAVELIST SFN_SYSTEM_DIR "savelist.bin" @@ -67,5 +66,3 @@ #define SFN_ICONS_DIRECTORY SFN_SYSTEM_DIR "icons/" #define SFN_CHEATS SFN_SYSTEM_DIR "cheats/usrcheat.dat" - -#endif //_SYSTEMFILENAMES_H_ diff --git a/arm9/source/testcases.h b/arm9/source/testcases.h index b23f567..7e5a0bb 100644 --- a/arm9/source/testcases.h +++ b/arm9/source/testcases.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _TESTCASES_H_ -#define _TESTCASES_H_ +#pragma once int PrintFreeMem(void); @@ -40,5 +39,3 @@ void testViolenceEEP512Kauto(u32 count); void testViolenceEEP8Mauto(u32 count); void testEEPReadStatus(); - -#endif //_TESTCASES_H_ diff --git a/arm9/source/timer.h b/arm9/source/timer.h index 5f7cf7d..5fbb543 100644 --- a/arm9/source/timer.h +++ b/arm9/source/timer.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _TIMER_H_ -#define _TIMER_H_ +#pragma once #include #include "singleton.h" @@ -59,5 +58,3 @@ typedef t_singleton timer_s; inline cTimer& timer() { return timer_s::instance(); } - -#endif //_TIMER_H_ diff --git a/arm9/source/timetool.h b/arm9/source/timetool.h index 7c43e3b..7b0e66c 100644 --- a/arm9/source/timetool.h +++ b/arm9/source/timetool.h @@ -24,9 +24,6 @@ THE SOFTWARE. ---------------------------------------------------------------------------------*/ -#ifndef _TIMETOOL_H_ -#define _TIMETOOL_H_ +#pragma once void waitMs(unsigned int requestTime); - -#endif //_TIMETOOL_H_ diff --git a/arm9/source/ui/binaryfind.h b/arm9/source/ui/binaryfind.h index 4c04403..e97fb41 100644 --- a/arm9/source/ui/binaryfind.h +++ b/arm9/source/ui/binaryfind.h @@ -16,8 +16,7 @@ along with this program. If not, see . */ -#ifndef __BINARYFIND_H__ -#define __BINARYFIND_H__ +#pragma once #include @@ -33,5 +32,3 @@ Iterator binary_find(Iterator first, Iterator last, const T& value, Compare cmp) return last; } } // namespace akui - -#endif diff --git a/arm9/source/ui/bitmapdesc.h b/arm9/source/ui/bitmapdesc.h index 3acf204..304dff2 100644 --- a/arm9/source/ui/bitmapdesc.h +++ b/arm9/source/ui/bitmapdesc.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _BMPWINDOWDESC_H_ -#define _BMPWINDOWDESC_H_ +#pragma once #include #include "bmp15.h" @@ -52,5 +51,3 @@ class cBitmapDesc : public cRenderDesc { }; } // namespace akui - -#endif //_BMPWINDOWDESC_H_ diff --git a/arm9/source/ui/button.h b/arm9/source/ui/button.h index 4830c84..ded5c11 100644 --- a/arm9/source/ui/button.h +++ b/arm9/source/ui/button.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_BUTTON_H_ -#define _AKUI_BUTTON_H_ +#pragma once #include "bmp15.h" #include "rectangle.h" @@ -112,5 +111,3 @@ class cButtonDesc : public cRenderDesc { COLOR _textColor; }; } // namespace akui - -#endif //_AKUI_BUTTON_H_ diff --git a/arm9/source/ui/form.h b/arm9/source/ui/form.h index 6eef128..f112c61 100644 --- a/arm9/source/ui/form.h +++ b/arm9/source/ui/form.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_FORM_H_ -#define _AKUI_FORM_H_ +#pragma once #include #include "bitmapdesc.h" @@ -77,5 +76,3 @@ class cForm : public cWindow { }; } // namespace akui - -#endif //_AKUI_FORM_H_ diff --git a/arm9/source/ui/formdesc.h b/arm9/source/ui/formdesc.h index c7c628b..bcdfbbd 100644 --- a/arm9/source/ui/formdesc.h +++ b/arm9/source/ui/formdesc.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _FORMDESC_H_ -#define _FORMDESC_H_ +#pragma once #include #include "bmp15.h" @@ -53,5 +52,3 @@ class cFormDesc : public cRenderDesc { }; } // namespace akui - -#endif //_FORMDESC_H_ diff --git a/arm9/source/ui/keymessage.h b/arm9/source/ui/keymessage.h index f0f8834..b43c987 100644 --- a/arm9/source/ui/keymessage.h +++ b/arm9/source/ui/keymessage.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_KEYMESSAGE_H_ -#define _AKUI_KEYMESSAGE_H_ +#pragma once #include "message.h" @@ -91,5 +90,3 @@ class cKeyMessage : public cMessage { // const unsigned char cKeyMessage::UI_KEY_LID = 14; //!< Lid state. } // namespace akui - -#endif //_AKUI_cKeyMessage_H_ diff --git a/arm9/source/ui/listview.h b/arm9/source/ui/listview.h index b4cbda7..6906128 100644 --- a/arm9/source/ui/listview.h +++ b/arm9/source/ui/listview.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_LISTVIEW_H_ -#define _AKUI_LISTVIEW_H_ +#pragma once #include #include @@ -181,4 +180,3 @@ class cListView : public cWindow { }; } // namespace akui -#endif //_LISTVIEW_H_ diff --git a/arm9/source/ui/message.h b/arm9/source/ui/message.h index 120d4ed..f72ac75 100644 --- a/arm9/source/ui/message.h +++ b/arm9/source/ui/message.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_MESSAGE_H_ -#define _AKUI_MESSAGE_H_ +#pragma once namespace akui { @@ -67,5 +66,3 @@ class cMessage { }; } // namespace akui - -#endif //_AKUI_MESSAGE_H_ diff --git a/arm9/source/ui/msgbox.h b/arm9/source/ui/msgbox.h index 167bbca..b8f9002 100644 --- a/arm9/source/ui/msgbox.h +++ b/arm9/source/ui/msgbox.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_MESSAGEBOX_H_ -#define _AKUI_MESSAGEBOX_H_ +#pragma once #include "button.h" #include "form.h" @@ -90,5 +89,3 @@ class cMessageBox : public cForm { u32 messageBox(cWindow* parent, const std::string& title, const std::string& msg, u32 style); } // namespace akui - -#endif //_MESSAGEBOX_H_ diff --git a/arm9/source/ui/point.h b/arm9/source/ui/point.h index 73cd2e3..ae57c55 100644 --- a/arm9/source/ui/point.h +++ b/arm9/source/ui/point.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_POINT_H_ -#define _AKUI_POINT_H_ +#pragma once #include @@ -72,5 +71,3 @@ typedef t_point cPointf; typedef t_point cSize; } // namespace akui - -#endif //_AKUI_POINT_H_ diff --git a/arm9/source/ui/popmenu.h b/arm9/source/ui/popmenu.h index 158c508..ebbc378 100644 --- a/arm9/source/ui/popmenu.h +++ b/arm9/source/ui/popmenu.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _POPMENU_H_ -#define _POPMENU_H_ +#pragma once #include #include @@ -86,4 +85,3 @@ class cPopMenu : public cWindow { }; } // namespace akui -#endif //_POPMENU_H_ diff --git a/arm9/source/ui/progressbar.h b/arm9/source/ui/progressbar.h index 239a66a..e4136cd 100644 --- a/arm9/source/ui/progressbar.h +++ b/arm9/source/ui/progressbar.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _PROGRESSBAR_H_ -#define _PROGRESSBAR_H_ +#pragma once #include "bmp15.h" #include "ui.h" @@ -46,5 +45,3 @@ class cProgressBar : public cWindow { }; } // namespace akui - -#endif //_PROGRESSBAR_H_ diff --git a/arm9/source/ui/progresswnd.h b/arm9/source/ui/progresswnd.h index b12d67a..8fd4ff3 100644 --- a/arm9/source/ui/progresswnd.h +++ b/arm9/source/ui/progresswnd.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _PROGRESSWND_H_ -#define _PROGRESSWND_H_ +#pragma once #include "progressbar.h" #include "singleton.h" @@ -64,5 +63,3 @@ typedef t_singleton progressWnd_s; inline akui::cProgressWnd& progressWnd() { return progressWnd_s::instance(); } - -#endif //_PROGRESSWND_H_ diff --git a/arm9/source/ui/rectangle.h b/arm9/source/ui/rectangle.h index 1ad2d1d..0718fba 100644 --- a/arm9/source/ui/rectangle.h +++ b/arm9/source/ui/rectangle.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_RECTANGLE_H_ -#define _AKUI_RECTANGLE_H_ +#pragma once #include "point.h" @@ -150,5 +149,3 @@ class cRect { // ************************************************************************************************* } // namespace akui - -#endif //_AKUI_RECTANGLE_H_ diff --git a/arm9/source/ui/renderdesc.h b/arm9/source/ui/renderdesc.h index 7e70cd7..e2dda9a 100644 --- a/arm9/source/ui/renderdesc.h +++ b/arm9/source/ui/renderdesc.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_RENDERDESC_H_ -#define _AKUI_RENDERDESC_H_ +#pragma once #include "gdi.h" #include "rectangle.h" @@ -46,4 +45,3 @@ class cRenderDesc { }; } // namespace akui -#endif //_AKUI_RENDERDESC_H_ diff --git a/arm9/source/ui/sigslot.h b/arm9/source/ui/sigslot.h index e553f7e..47e46c2 100644 --- a/arm9/source/ui/sigslot.h +++ b/arm9/source/ui/sigslot.h @@ -22,8 +22,7 @@ // The original version of this code was written and placed in the public domain by Sarah Thompson // See http://sigslot.sourceforge.net/ // __________________________________________________________________________________________________ -#ifndef SIGSLOT__H -#define SIGSLOT__H +#pragma once #include #include @@ -465,5 +464,3 @@ class Signal1 : public BasicSignal1 { }; } // namespace akui - -#endif // SIGSLOT__H diff --git a/arm9/source/ui/spinbox.h b/arm9/source/ui/spinbox.h index 7e2096b..cffa94a 100644 --- a/arm9/source/ui/spinbox.h +++ b/arm9/source/ui/spinbox.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _SPINBOX_H_ -#define _SPINBOX_H_ +#pragma once #include #include @@ -80,5 +79,3 @@ class cSpinBox : public cForm { }; } // namespace akui - -#endif //_SPINBOX_H_ diff --git a/arm9/source/ui/statictext.h b/arm9/source/ui/statictext.h index 19a25b3..f8dd03d 100644 --- a/arm9/source/ui/statictext.h +++ b/arm9/source/ui/statictext.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _STATICTEXT_H_ -#define _STATICTEXT_H_ +#pragma once #include "bmp15.h" #include "window.h" @@ -44,5 +43,3 @@ class cStaticText : public cWindow { }; } // namespace akui - -#endif //_STATICTEXT_H_ diff --git a/arm9/source/ui/touchmessage.h b/arm9/source/ui/touchmessage.h index 5f807f5..f987411 100644 --- a/arm9/source/ui/touchmessage.h +++ b/arm9/source/ui/touchmessage.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_TOUCHMESSAGE_H_ -#define _AKUI_TOUCHMESSAGE_H_ +#pragma once #include "message.h" @@ -58,5 +57,3 @@ class cTouchMessage : public cMessage { }; } // namespace akui - -#endif //_AKUI_TOUCHMESSAGE_H_ diff --git a/arm9/source/ui/ui.h b/arm9/source/ui/ui.h index e47462f..8a9879c 100644 --- a/arm9/source/ui/ui.h +++ b/arm9/source/ui/ui.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_H_ -#define _AKUI_H_ +#pragma once #include #include "../../share/memtool.h" @@ -60,5 +59,3 @@ #include "globalsettings.h" #include "systemfilenames.h" #include "uisettings.h" - -#endif //_AKUI_H_ diff --git a/arm9/source/ui/uisettings.h b/arm9/source/ui/uisettings.h index 1a5a0ba..c5090a4 100644 --- a/arm9/source/ui/uisettings.h +++ b/arm9/source/ui/uisettings.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _UISETTINGS_H_ -#define _UISETTINGS_H_ +#pragma once #include #include "gdi.h" @@ -65,5 +64,3 @@ inline cUISettings& uiSettings() { inline cUISettings& uis() { return uiSettings_s::instance(); } - -#endif //_UISETTINGS_H_ diff --git a/arm9/source/ui/window.h b/arm9/source/ui/window.h index ee93e30..3c4f2df 100644 --- a/arm9/source/ui/window.h +++ b/arm9/source/ui/window.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_WINDOW_H_ -#define _AKUI_WINDOW_H_ +#pragma once #include #include "dbgtool.h" @@ -183,4 +182,3 @@ class cWindow : public SlotHolder { }; } // namespace akui -#endif //_AKUI_WINDOW_H_ diff --git a/arm9/source/ui/windowmanager.h b/arm9/source/ui/windowmanager.h index 1396f94..45418ef 100644 --- a/arm9/source/ui/windowmanager.h +++ b/arm9/source/ui/windowmanager.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _AKUI_WINDOWMANAGER_H_ -#define _AKUI_WINDOWMANAGER_H_ +#pragma once #include #include @@ -72,5 +71,3 @@ inline cWindowManager& windowManager(void) { return cWindowManager_s::instance(); } } // namespace akui - -#endif //_AKUI_WINDOWMANAGER_H_ diff --git a/arm9/source/unicode.h b/arm9/source/unicode.h index b231aaf..3bbb181 100644 --- a/arm9/source/unicode.h +++ b/arm9/source/unicode.h @@ -18,13 +18,10 @@ along with this program. If not, see . */ -#ifndef _UNICODE_H_ -#define _UNICODE_H_ +#pragma once #include #include std::string unicode_to_local_string(const u16* unicode_string, size_t length, bool* defCharUsed = NULL); - -#endif //_UNICODE_H_ diff --git a/arm9/source/userinput.h b/arm9/source/userinput.h index 3e81a84..c503f31 100644 --- a/arm9/source/userinput.h +++ b/arm9/source/userinput.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef __USERINPUT_H__ -#define __USERINPUT_H__ +#pragma once #include @@ -53,5 +52,3 @@ INPUT& getInput(); u32 getInputIdleMs(); void resetInputIdle(void); bool processInput(INPUT& inputs); - -#endif //_INPUT_H_ diff --git a/arm9/source/userwnd.h b/arm9/source/userwnd.h index 3670ce7..c2f7520 100644 --- a/arm9/source/userwnd.h +++ b/arm9/source/userwnd.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _USERWINDOW_H_ -#define _USERWINDOW_H_ +#pragma once #include "bmp15.h" #include "datetime.h" @@ -63,5 +62,3 @@ typedef t_singleton UserWindow_s; inline cUserWindow& userWindow() { return UserWindow_s::instance(); } - -#endif //_UserWindow_H_ diff --git a/arm9/source/zoomingicon.h b/arm9/source/zoomingicon.h index c1990c1..b3dce04 100644 --- a/arm9/source/zoomingicon.h +++ b/arm9/source/zoomingicon.h @@ -18,8 +18,7 @@ along with this program. If not, see . */ -#ifndef _ZOOMINGICON_H_ -#define _ZOOMINGICON_H_ +#pragma once #include #include "animation.h" @@ -57,5 +56,3 @@ class cZoomingIcon : public cAnimation { float _scale; bool _needUpdateBuffer; }; - -#endif //_ZOOMINGICON_H_ diff --git a/share/fifotool.h b/share/fifotool.h index 9f7a060..c442efb 100644 --- a/share/fifotool.h +++ b/share/fifotool.h @@ -16,8 +16,7 @@ along with this program. If not, see . */ -#ifndef __FIFOTOOL_H__ -#define __FIFOTOOL_H__ +#pragma once #define MENU_MSG_GBA 1 #define MENU_MSG_ARM7_REBOOT 2 @@ -30,5 +29,3 @@ #define MENU_MSG_BRIGHTNESS_SET2 10 #define MENU_MSG_BRIGHTNESS_SET3 11 #define MENU_MSG_SHUTDOWN 12 - -#endif diff --git a/share/memtool.h b/share/memtool.h index 3a7ff19..e2f0a20 100644 --- a/share/memtool.h +++ b/share/memtool.h @@ -24,8 +24,7 @@ THE SOFTWARE. ---------------------------------------------------------------------------------*/ -#ifndef _MEMTOOL_H_ -#define _MEMTOOL_H_ +#pragma once inline void fillMemory(void* addr, u32 count, u32 value) { swiFastCopy((void*)(&value), addr, (count >> 2) | COPY_MODE_WORD | COPY_MODE_FILL); @@ -34,5 +33,3 @@ inline void fillMemory(void* addr, u32 count, u32 value) { inline void zeroMemory(void* addr, u32 count) { fillMemory(addr, count, 0); } - -#endif //_MEMTOOL_H_