From f0bffed73ca35720240debaa63dd82f3ee9645d9 Mon Sep 17 00:00:00 2001 From: Sebastian Pape Date: Mon, 31 Mar 2025 17:51:56 +0200 Subject: [PATCH 1/3] Fixing missing guards --- Src/Common/AppSettingsData.h | 2 ++ Src/Common/OpenGLScreen.h | 3 +++ Src/Common/SBTree.h | 2 ++ Src/Common/Unicode/ConvertUTF.h | 2 ++ Src/Common/round.h | 2 ++ 5 files changed, 11 insertions(+) diff --git a/Src/Common/AppSettingsData.h b/Src/Common/AppSettingsData.h index 2b1ebbfd2..acc1ceb06 100644 --- a/Src/Common/AppSettingsData.h +++ b/Src/Common/AppSettingsData.h @@ -1,3 +1,5 @@ +#pragma once + #include "AppSettingsHeader.h" #include "../DasherCore/Parameters.h" diff --git a/Src/Common/OpenGLScreen.h b/Src/Common/OpenGLScreen.h index d9004df81..1af4470a9 100755 --- a/Src/Common/OpenGLScreen.h +++ b/Src/Common/OpenGLScreen.h @@ -5,6 +5,9 @@ // Created by Alan Lawrence on 20/03/2009. // Copyright 2009 Cavendish Laboratory. All rights reserved. // + +#pragma once + #if TARGET_OS_IPHONE #import #else diff --git a/Src/Common/SBTree.h b/Src/Common/SBTree.h index ddcb83dd5..aca7f07d0 100644 --- a/Src/Common/SBTree.h +++ b/Src/Common/SBTree.h @@ -7,6 +7,8 @@ * */ + #pragma once + class SBTree { public: SBTree(int iValue); diff --git a/Src/Common/Unicode/ConvertUTF.h b/Src/Common/Unicode/ConvertUTF.h index 8607f7db0..41958887b 100644 --- a/Src/Common/Unicode/ConvertUTF.h +++ b/Src/Common/Unicode/ConvertUTF.h @@ -20,6 +20,8 @@ * remains attached. */ +#pragma once + /* --------------------------------------------------------------------- Conversions between UTF32, UTF-16, and UTF-8. Header file. diff --git a/Src/Common/round.h b/Src/Common/round.h index f2f5b0a22..0ad3a2c8b 100644 --- a/Src/Common/round.h +++ b/Src/Common/round.h @@ -1,3 +1,5 @@ +#pragma once + extern "C" { double round(double); } From a0d24fe343ba8d3cd5e0533f32e9ece88927dd15 Mon Sep 17 00:00:00 2001 From: Sebastian Pape Date: Mon, 31 Mar 2025 17:56:06 +0200 Subject: [PATCH 2/3] Converting all Include-Guards to Pragma Once --- Src/Common/Allocators/PooledAlloc.h | 4 +--- Src/Common/Allocators/SimplePooledAlloc.h | 4 +--- Src/Common/AppSettingsHeader.h | 4 +--- Src/Common/Globber.h | 4 +--- Src/Common/I18n.h | 4 +--- Src/Common/MSVC_Unannoy.h | 4 +--- Src/Common/ModuleSettings.h | 4 +--- Src/Common/NoClones.h | 4 +--- Src/Common/Platform/stdminmax.h | 4 +--- Src/Common/Trace.h | 4 +--- Src/Common/myassert.h | 4 +--- Src/Common/mydebug.h | 4 +--- Src/DasherCore/Alphabet/AlphInfo.h | 4 +--- Src/DasherCore/Alphabet/AlphabetMap.h | 4 +--- Src/DasherCore/Alphabet/GroupInfo.h | 4 +--- Src/DasherCore/AlphabetManager.h | 4 +--- Src/DasherCore/AlternatingDirectMode.h | 4 +--- Src/DasherCore/AutoSpeedControl.h | 4 +--- Src/DasherCore/BasicLog.h | 4 +--- Src/DasherCore/ButtonMode.h | 4 +--- Src/DasherCore/ButtonMultiPress.h | 4 +--- Src/DasherCore/CannaConversionHelper.h | 4 +--- Src/DasherCore/CircleStartHandler.h | 4 +--- Src/DasherCore/ClickFilter.h | 4 +--- Src/DasherCore/CompassMode.h | 4 +--- Src/DasherCore/ConversionManager.h | 4 +--- Src/DasherCore/ConvertingAlphMgr.h | 4 +--- Src/DasherCore/DashIntfScreenMsgs.h | 4 +--- Src/DasherCore/DashIntfSettings.h | 4 +--- Src/DasherCore/DasherButtons.h | 4 +--- Src/DasherCore/DasherInput.h | 4 +--- Src/DasherCore/DasherInterfaceBase.h | 4 +--- Src/DasherCore/DasherModel.h | 4 +--- Src/DasherCore/DasherModule.h | 4 +--- Src/DasherCore/DasherNode.h | 4 +--- Src/DasherCore/DasherScreen.h | 4 +--- Src/DasherCore/DasherTypes.h | 4 +--- Src/DasherCore/DasherView.h | 4 +--- Src/DasherCore/DefaultFilter.h | 4 +--- Src/DasherCore/DemoFilter.h | 4 +--- Src/DasherCore/DynamicButtons.h | 4 +--- Src/DasherCore/DynamicFilter.h | 4 +--- Src/DasherCore/FileWordGenerator.h | 4 +--- Src/DasherCore/FrameRate.h | 4 +--- Src/DasherCore/GameModule.h | 4 +--- Src/DasherCore/GameStatistics.h | 4 +--- Src/DasherCore/InputFilter.h | 4 +--- Src/DasherCore/LanguageModelling/CTWLanguageModel.h | 4 +--- Src/DasherCore/LanguageModelling/DictLanguageModel.h | 4 +--- Src/DasherCore/LanguageModelling/HashTable.h | 4 +--- Src/DasherCore/LanguageModelling/LanguageModel.h | 4 +--- Src/DasherCore/LanguageModelling/MixtureLanguageModel.h | 4 +--- Src/DasherCore/LanguageModelling/PPMLanguageModel.h | 4 +--- Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h | 4 +--- Src/DasherCore/LanguageModelling/RoutingPPMLanguageModel.h | 4 +--- Src/DasherCore/LanguageModelling/WordLanguageModel.h | 4 +--- Src/DasherCore/MandarinAlphMgr.h | 4 +--- Src/DasherCore/NodeCreationManager.h | 4 +--- Src/DasherCore/NodeManager.h | 4 +--- Src/DasherCore/OneButtonDynamicFilter.h | 4 +--- Src/DasherCore/OneButtonFilter.h | 4 +--- Src/DasherCore/OneDimensionalFilter.h | 4 +--- Src/DasherCore/RoutingAlphMgr.h | 4 +--- Src/DasherCore/SCENode.h | 4 +--- Src/DasherCore/ScreenGameModule.h | 4 +--- Src/DasherCore/SettingsStore.h | 4 +--- Src/DasherCore/SimpleTimer.h | 4 +--- Src/DasherCore/SocketInput.h | 4 +--- Src/DasherCore/SocketInputBase.h | 4 +--- Src/DasherCore/StartHandler.h | 4 +--- Src/DasherCore/StylusFilter.h | 4 +--- Src/DasherCore/TimeSpan.h | 4 +--- Src/DasherCore/Trainer.h | 4 +--- Src/DasherCore/TwoBoxStartHandler.h | 4 +--- Src/DasherCore/TwoButtonDynamicFilter.h | 4 +--- Src/DasherCore/TwoPushDynamicFilter.h | 4 +--- Src/DasherCore/UserButton.h | 4 +--- Src/DasherCore/UserLocation.h | 4 +--- Src/DasherCore/UserLog.h | 4 +--- Src/DasherCore/UserLogBase.h | 4 +--- Src/DasherCore/UserLogParam.h | 4 +--- Src/DasherCore/UserLogTrial.h | 4 +--- Src/DasherCore/WordGeneratorBase.h | 4 +--- Src/DasherCore/XMLUtil.h | 4 +--- 84 files changed, 84 insertions(+), 252 deletions(-) diff --git a/Src/Common/Allocators/PooledAlloc.h b/Src/Common/Allocators/PooledAlloc.h index 7ea72acbe..a8597c89a 100644 --- a/Src/Common/Allocators/PooledAlloc.h +++ b/Src/Common/Allocators/PooledAlloc.h @@ -2,8 +2,7 @@ // // Copyright (c) 2005 David Ward -#ifndef __PooledAlloc_h__ -#define __PooledAlloc_h__ +#pragma once // CPooledAlloc allocates objects T in fixed-size blocks (specified in the constructor) // Alloc returns an uninitialized T* @@ -54,4 +53,3 @@ template void CPooledAlloc::Free(T *pFree) { m_vpFree.push_back(pFree); } -#endif // __include__ diff --git a/Src/Common/Allocators/SimplePooledAlloc.h b/Src/Common/Allocators/SimplePooledAlloc.h index 9141240de..847671916 100644 --- a/Src/Common/Allocators/SimplePooledAlloc.h +++ b/Src/Common/Allocators/SimplePooledAlloc.h @@ -2,8 +2,7 @@ // // Copyright (c) 2005 David Ward -#ifndef __SimplePooledAlloc_h__ -#define __SimplePooledAlloc_h__ +#pragma once // CSimplePooledAlloc allocates objects T in fixed-size blocks (specified) // Alloc returns a default-constructed T* @@ -67,4 +66,3 @@ template < typename T > T * CSimplePooledAlloc < T >::Alloc() { return m_vPool.back()->Alloc(); } -#endif // __include__ diff --git a/Src/Common/AppSettingsHeader.h b/Src/Common/AppSettingsHeader.h index 94ec0cffd..b77079f70 100644 --- a/Src/Common/AppSettingsHeader.h +++ b/Src/Common/AppSettingsHeader.h @@ -1,5 +1,4 @@ -#ifndef __appsettingsheader_h__ -#define __appsettingsheader_h__ +#pragma once #include "../DasherCore/Parameters.h" #ifdef HAVE_CONFIG_H @@ -31,4 +30,3 @@ enum { APP_STYLE_COMPOSE, APP_STYLE_DIRECT, APP_STYLE_FULLSCREEN }; -#endif diff --git a/Src/Common/Globber.h b/Src/Common/Globber.h index 41879a74b..41b54eb4a 100644 --- a/Src/Common/Globber.h +++ b/Src/Common/Globber.h @@ -6,8 +6,7 @@ // Copyright 2011 Cambridge University. All rights reserved. // -#ifndef __GLOBBER_H__ -#define __GLOBBER_H__ +#pragma once #include "../DasherCore/AbstractXMLParser.h" @@ -19,4 +18,3 @@ void globScan(AbstractParser *parser, const char **sysPaths, int(*error_callback)(const char *,int)); -#endif diff --git a/Src/Common/I18n.h b/Src/Common/I18n.h index 2b4f95520..b87b71470 100644 --- a/Src/Common/I18n.h +++ b/Src/Common/I18n.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __i18n_h__ -#define __i18n_h__ +#pragma once #if defined(_WIN32) || defined(__APPLE__) @@ -42,4 +41,3 @@ #endif -#endif diff --git a/Src/Common/MSVC_Unannoy.h b/Src/Common/MSVC_Unannoy.h index e19c5889a..e72ceee75 100644 --- a/Src/Common/MSVC_Unannoy.h +++ b/Src/Common/MSVC_Unannoy.h @@ -1,5 +1,4 @@ -#ifndef __MSVC_Unannoy_h__ -#define __MSVC_Unannoy_h__ +#pragma once // Sorry about this frequently included header non-VC++ users. // It shouldn't do any harm. @@ -15,4 +14,3 @@ #pragma warning(disable:4996) // warning C4996: 'fopen' was declared deprecated #endif -#endif /* #ifndef __MSVC_Unannoy_h__ */ diff --git a/Src/Common/ModuleSettings.h b/Src/Common/ModuleSettings.h index 4e6e72f2b..7a65aa974 100644 --- a/Src/Common/ModuleSettings.h +++ b/Src/Common/ModuleSettings.h @@ -1,5 +1,4 @@ -#ifndef __ModuleSettings_h__ -#define __ModuleSettings_h__ +#pragma once enum setting_t { T_BOOL, @@ -20,4 +19,3 @@ struct _SModuleSettings { const char *szDescription; }; -#endif diff --git a/Src/Common/NoClones.h b/Src/Common/NoClones.h index 6490c5816..608bef928 100644 --- a/Src/Common/NoClones.h +++ b/Src/Common/NoClones.h @@ -1,5 +1,4 @@ -#ifndef __NoClones_h__ -#define __NoClones_h__ +#pragma once /* Explanation of NoClones {{{ @@ -36,4 +35,3 @@ class NoClones { NoClones & operator=(const NoClones &); }; -#endif /* #ifndef __NoClones_h__ */ diff --git a/Src/Common/Platform/stdminmax.h b/Src/Common/Platform/stdminmax.h index e7206d1b2..06fd6212b 100644 --- a/Src/Common/Platform/stdminmax.h +++ b/Src/Common/Platform/stdminmax.h @@ -6,8 +6,7 @@ // ///////////////////////////////////////////////////////////////////////////// -#ifndef __Platform_stdminmax__ -#define __Platform_stdminmax__ +#pragma once #if _MSC_VER < 1300 @@ -21,4 +20,3 @@ namespace std { }; #endif -#endif // __Platform_stdminmax__ diff --git a/Src/Common/Trace.h b/Src/Common/Trace.h index 1fd0d9756..cb69bc079 100644 --- a/Src/Common/Trace.h +++ b/Src/Common/Trace.h @@ -2,8 +2,7 @@ // // Copyright (c) 2005 David Ward -#ifndef __Common_Trace_h__ -#define __Common_Trace_h__ +#pragma once // Trace is a mechanism for printf-like debugging that can be switched on/off // at compile time @@ -50,4 +49,3 @@ inline void DasherTraceOutput(const char *pszFormat, ...) { #endif // DASHER_TRACE -#endif diff --git a/Src/Common/myassert.h b/Src/Common/myassert.h index 0217acdbc..4a0381568 100644 --- a/Src/Common/myassert.h +++ b/Src/Common/myassert.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __assert_h__ -#define __assert_h__ +#pragma once #ifdef HAVE_CONFIG_H #include @@ -69,4 +68,3 @@ #endif -#endif // __assert_h__ diff --git a/Src/Common/mydebug.h b/Src/Common/mydebug.h index 829f86cd4..fa152522e 100644 --- a/Src/Common/mydebug.h +++ b/Src/Common/mydebug.h @@ -1,6 +1,4 @@ -#ifndef __mydebug_h__ -#define __mydebug_h__ +#pragma once #define DASHER_DEBUG(x) g_message(x) -#endif diff --git a/Src/DasherCore/Alphabet/AlphInfo.h b/Src/DasherCore/Alphabet/AlphInfo.h index ad590dfb4..9fcc0142d 100644 --- a/Src/DasherCore/Alphabet/AlphInfo.h +++ b/Src/DasherCore/Alphabet/AlphInfo.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __ALPHINFO_H__ -#define __ALPHINFO_H__ +#pragma once #include "../DasherTypes.h" @@ -167,4 +166,3 @@ class Dasher::CAlphInfo : public SGroupInfo { /// @} -#endif /* #ifndef __AlphInfo_h__ */ diff --git a/Src/DasherCore/Alphabet/AlphabetMap.h b/Src/DasherCore/Alphabet/AlphabetMap.h index 3418708d0..555104252 100644 --- a/Src/DasherCore/Alphabet/AlphabetMap.h +++ b/Src/DasherCore/Alphabet/AlphabetMap.h @@ -7,8 +7,7 @@ ///////////////////////////////////////////////////////////////////////////// -#ifndef __AlphabetMap_h__ -#define __AlphabetMap_h__ +#pragma once #ifndef _WIN32 #include @@ -176,4 +175,3 @@ class Dasher::CAlphabetMap { }; /// \} -#endif /* #ifndef __AlphabetMap_h__ */ diff --git a/Src/DasherCore/Alphabet/GroupInfo.h b/Src/DasherCore/Alphabet/GroupInfo.h index f9c292480..1c2b0e23d 100644 --- a/Src/DasherCore/Alphabet/GroupInfo.h +++ b/Src/DasherCore/Alphabet/GroupInfo.h @@ -1,5 +1,4 @@ -#ifndef __GROUP_INFO_H__ -#define __GROUP_INFO_H__ +#pragma once #include @@ -32,4 +31,3 @@ struct SGroupInfo { }; -#endif diff --git a/Src/DasherCore/AlphabetManager.h b/Src/DasherCore/AlphabetManager.h index 2dab01254..9b69a7cf0 100644 --- a/Src/DasherCore/AlphabetManager.h +++ b/Src/DasherCore/AlphabetManager.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __alphabetmanager_h__ -#define __alphabetmanager_h__ +#pragma once #include @@ -356,4 +355,3 @@ namespace Dasher { } -#endif diff --git a/Src/DasherCore/AlternatingDirectMode.h b/Src/DasherCore/AlternatingDirectMode.h index 388ff2bba..178c8cd2e 100644 --- a/Src/DasherCore/AlternatingDirectMode.h +++ b/Src/DasherCore/AlternatingDirectMode.h @@ -2,8 +2,7 @@ // DasherButtons.h // Copyright 2005 by Chris Ball -#ifndef __ALTERNATING_DIRECT_MODE_H__ -#define __ALTERNATING_DIRECT_MODE_H__ +#pragma once #include "DasherButtons.h" @@ -33,4 +32,3 @@ namespace Dasher { } /// @} -#endif diff --git a/Src/DasherCore/AutoSpeedControl.h b/Src/DasherCore/AutoSpeedControl.h index 41650cd6d..7589d6c20 100644 --- a/Src/DasherCore/AutoSpeedControl.h +++ b/Src/DasherCore/AutoSpeedControl.h @@ -1,5 +1,4 @@ -#ifndef __AUTO_SPEED_CONTROL_H__ -#define __AUTO_SPEED_CONTROL_H__ +#pragma once #include "DasherTypes.h" #include "DasherView.h" @@ -82,4 +81,3 @@ namespace Dasher { } /// @} -#endif diff --git a/Src/DasherCore/BasicLog.h b/Src/DasherCore/BasicLog.h index ee788a2ec..e13ffb36f 100644 --- a/Src/DasherCore/BasicLog.h +++ b/Src/DasherCore/BasicLog.h @@ -1,5 +1,4 @@ -#ifndef __BasicLog_h__ -#define __BasicLog_h__ +#pragma once #include "UserLogBase.h" #include "SettingsStore.h" @@ -45,4 +44,3 @@ class CBasicLog : public CUserLogBase { }; /// @} -#endif diff --git a/Src/DasherCore/ButtonMode.h b/Src/DasherCore/ButtonMode.h index fe9b2a27e..ae19a44f6 100644 --- a/Src/DasherCore/ButtonMode.h +++ b/Src/DasherCore/ButtonMode.h @@ -2,8 +2,7 @@ // ButtonMode.h // Copyright 2009 by Alan Lawrence -#ifndef __BUTTON_MODE_H__ -#define __BUTTON_MODE_H__ +#pragma once #include "DasherButtons.h" @@ -34,4 +33,3 @@ class CButtonMode : public CDasherButtons } /// @} -#endif diff --git a/Src/DasherCore/ButtonMultiPress.h b/Src/DasherCore/ButtonMultiPress.h index 1a18812f6..0d8c05c69 100644 --- a/Src/DasherCore/ButtonMultiPress.h +++ b/Src/DasherCore/ButtonMultiPress.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __ButtonMultiPress_h__ -#define __ButtonMultiPress_h__ +#pragma once #include "DynamicButtons.h" @@ -57,4 +56,3 @@ class CButtonMultiPress : public CDynamicButtons { }; } -#endif diff --git a/Src/DasherCore/CannaConversionHelper.h b/Src/DasherCore/CannaConversionHelper.h index 2422aac4e..6ed552b1b 100644 --- a/Src/DasherCore/CannaConversionHelper.h +++ b/Src/DasherCore/CannaConversionHelper.h @@ -1,5 +1,4 @@ -#ifndef __CANNA_CONVERSION_HELPER_H__ -#define __CANNA_CONVERSION_HELPER_H__ +#pragma once #define BUFSIZE 10240 @@ -145,4 +144,3 @@ class CCannaConversionHelper : public Dasher::CConversionManager { }; /// @} -#endif diff --git a/Src/DasherCore/CircleStartHandler.h b/Src/DasherCore/CircleStartHandler.h index 993555949..8a64089e2 100644 --- a/Src/DasherCore/CircleStartHandler.h +++ b/Src/DasherCore/CircleStartHandler.h @@ -1,5 +1,4 @@ -#ifndef __CIRCLE_START_HANDLER_H__ -#define __CIRCLE_START_HANDLER_H__ +#pragma once #include "StartHandler.h" #include "SettingsStore.h" @@ -34,4 +33,3 @@ class CCircleStartHandler : public CStartHandler { } /// @} -#endif diff --git a/Src/DasherCore/ClickFilter.h b/Src/DasherCore/ClickFilter.h index ccbc0dd47..f0ac1f168 100644 --- a/Src/DasherCore/ClickFilter.h +++ b/Src/DasherCore/ClickFilter.h @@ -1,5 +1,4 @@ -#ifndef __CLICK_FILTER_H__ -#define __CLICK_FILTER_H__ +#pragma once #include @@ -35,4 +34,3 @@ class CClickFilter : public CStaticFilter, private CZoomAdjuster { } /// @} -#endif diff --git a/Src/DasherCore/CompassMode.h b/Src/DasherCore/CompassMode.h index f1fc941c2..ee10dd2a6 100644 --- a/Src/DasherCore/CompassMode.h +++ b/Src/DasherCore/CompassMode.h @@ -2,8 +2,7 @@ // DasherButtons.h // Copyright 2005 by Chris Ball -#ifndef __COMPASS_MODE_H__ -#define __COMPASS_MODE_H__ +#pragma once #include "DasherButtons.h" @@ -30,4 +29,3 @@ class CCompassMode : public CDasherButtons } /// @} -#endif diff --git a/Src/DasherCore/ConversionManager.h b/Src/DasherCore/ConversionManager.h index ff5fca7f7..2cbadb644 100644 --- a/Src/DasherCore/ConversionManager.h +++ b/Src/DasherCore/ConversionManager.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __conversion_manager_h__ -#define __conversion_manager_h__ +#pragma once #include @@ -226,4 +225,3 @@ namespace Dasher { /// @} } -#endif diff --git a/Src/DasherCore/ConvertingAlphMgr.h b/Src/DasherCore/ConvertingAlphMgr.h index bcb54a78b..400e2c9be 100644 --- a/Src/DasherCore/ConvertingAlphMgr.h +++ b/Src/DasherCore/ConvertingAlphMgr.h @@ -7,8 +7,7 @@ * */ -#ifndef __CONVERTING_ALPH_MGR_H__ -#define __CONVERTING_ALPH_MGR_H__ +#pragma once #include "AlphabetManager.h" #include "ConversionManager.h" @@ -38,4 +37,3 @@ namespace Dasher { }; } -#endif diff --git a/Src/DasherCore/DashIntfScreenMsgs.h b/Src/DasherCore/DashIntfScreenMsgs.h index 39fdf2f66..1a2ea5eed 100644 --- a/Src/DasherCore/DashIntfScreenMsgs.h +++ b/Src/DasherCore/DashIntfScreenMsgs.h @@ -19,8 +19,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __DASH_INTF_SCREEN_MSGS_H__ -#define __DASH_INTF_SCREEN_MSGS_H__ +#pragma once #include "DashIntfSettings.h" @@ -74,4 +73,3 @@ class CDashIntfScreenMsgs : public CDashIntfSettings { }; } -#endif diff --git a/Src/DasherCore/DashIntfSettings.h b/Src/DasherCore/DashIntfSettings.h index 37af05db4..a1d28a2d3 100644 --- a/Src/DasherCore/DashIntfSettings.h +++ b/Src/DasherCore/DashIntfSettings.h @@ -19,8 +19,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __DASH_INTF_SETTINGS_H__ -#define __DASH_INTF_SETTINGS_H__ +#pragma once #include "DasherInterfaceBase.h" @@ -49,4 +48,3 @@ class CDashIntfSettings : public CDasherInterfaceBase { }; } -#endif diff --git a/Src/DasherCore/DasherButtons.h b/Src/DasherCore/DasherButtons.h index f66a73d49..690c8bc0f 100644 --- a/Src/DasherCore/DasherButtons.h +++ b/Src/DasherCore/DasherButtons.h @@ -2,8 +2,7 @@ // DasherButtons.h // Copyright 2005 by Chris Ball -#ifndef __DASHER_BUTTONS_H__ -#define __DASHER_BUTTONS_H__ +#pragma once #include "InputFilter.h" @@ -43,4 +42,3 @@ class CDasherButtons : public CStaticFilter } /// @} -#endif diff --git a/Src/DasherCore/DasherInput.h b/Src/DasherCore/DasherInput.h index 922ab2a8c..44880ce19 100644 --- a/Src/DasherCore/DasherInput.h +++ b/Src/DasherCore/DasherInput.h @@ -2,8 +2,7 @@ // // Copyright (c) 2005 Phil Cowans -#ifndef __DasherInput_h__ -#define __DasherInput_h__ +#pragma once #include "DasherTypes.h" #include "DasherModule.h" @@ -92,4 +91,3 @@ class Dasher::CDasherCoordInput : public CDasherInput { }; /// \} -#endif diff --git a/Src/DasherCore/DasherInterfaceBase.h b/Src/DasherCore/DasherInterfaceBase.h index 1daa36931..35461fd99 100644 --- a/Src/DasherCore/DasherInterfaceBase.h +++ b/Src/DasherCore/DasherInterfaceBase.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __DasherInterfaceBase_h__ -#define __DasherInterfaceBase_h__ +#pragma once /// /// \mainpage @@ -541,4 +540,3 @@ class Dasher::CDasherInterfaceBase : public CMessageDisplay, private NoClones { }; /// @} -#endif /* #ifndef __DasherInterfaceBase_h__ */ diff --git a/Src/DasherCore/DasherModel.h b/Src/DasherCore/DasherModel.h index 66290e0d3..7b90ca92a 100644 --- a/Src/DasherCore/DasherModel.h +++ b/Src/DasherCore/DasherModel.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __DasherModel_h__ -#define __DasherModel_h__ +#pragma once #include @@ -257,4 +256,3 @@ class Dasher::CDasherModel: private NoClones }; /// @} -#endif /* #ifndef __DasherModel_h__ */ diff --git a/Src/DasherCore/DasherModule.h b/Src/DasherCore/DasherModule.h index 36402bd8e..1fb7d3f07 100644 --- a/Src/DasherCore/DasherModule.h +++ b/Src/DasherCore/DasherModule.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef DASHER_MODULE_H -#define DASHER_MODULE_H +#pragma once #include "../Common/ModuleSettings.h" @@ -43,4 +42,3 @@ class CDasherModule { }; /// @} -#endif diff --git a/Src/DasherCore/DasherNode.h b/Src/DasherCore/DasherNode.h index 62759824a..9b7626763 100644 --- a/Src/DasherCore/DasherNode.h +++ b/Src/DasherCore/DasherNode.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __DasherNode_h__ -#define __DasherNode_h__ +#pragma once #include "../Common/NoClones.h" //Includes needed for used classes @@ -347,4 +346,3 @@ inline CDasherNode *CDasherNode::Parent() const { } } -#endif /* #ifndef __DasherNode_h__ */ diff --git a/Src/DasherCore/DasherScreen.h b/Src/DasherCore/DasherScreen.h index d0d6b2a7a..b5a94eba5 100644 --- a/Src/DasherCore/DasherScreen.h +++ b/Src/DasherCore/DasherScreen.h @@ -2,8 +2,7 @@ // // Copyright (c) 2001-2004 David Ward -#ifndef __DasherScreen_h_ -#define __DasherScreen_h_ +#pragma once #include "DasherTypes.h" #include "ColorPalette.h" @@ -230,4 +229,3 @@ class Dasher::CLabelListScreen : public Dasher::CDasherScreen /// @} -#endif /* #ifndef __DasherScreen_h_ */ diff --git a/Src/DasherCore/DasherTypes.h b/Src/DasherCore/DasherTypes.h index a351ae8bb..3a5ded708 100644 --- a/Src/DasherCore/DasherTypes.h +++ b/Src/DasherCore/DasherTypes.h @@ -2,8 +2,7 @@ // // Copyright (c) 2001-2002 David Ward -#ifndef __DasherTypes_h__ -#define __DasherTypes_h__ +#pragma once // We use our own version of hungarian notation to indicate // the type of variables: @@ -114,4 +113,3 @@ namespace Keys typedef std::vector VECTOR_SYMBOL_PROB; } -#endif /* #ifndef __DasherTypes_h__ */ diff --git a/Src/DasherCore/DasherView.h b/Src/DasherCore/DasherView.h index be6b9846d..a240252c2 100644 --- a/Src/DasherCore/DasherView.h +++ b/Src/DasherCore/DasherView.h @@ -2,8 +2,7 @@ // // Copyright (c) 2001-2005 David Ward -#ifndef __DasherView_h_ -#define __DasherView_h_ +#pragma once namespace Dasher { @@ -232,4 +231,3 @@ class Dasher::CDasherView /// @} -#endif /* #ifndef __DasherView_h_ */ diff --git a/Src/DasherCore/DefaultFilter.h b/Src/DasherCore/DefaultFilter.h index 2720c8aa2..410a6ca85 100644 --- a/Src/DasherCore/DefaultFilter.h +++ b/Src/DasherCore/DefaultFilter.h @@ -1,5 +1,4 @@ -#ifndef __DEFAULT_FILTER_H__ -#define __DEFAULT_FILTER_H__ +#pragma once #include "DynamicFilter.h" #include "AutoSpeedControl.h" @@ -50,4 +49,3 @@ class CDefaultFilter : public CDynamicFilter { } /// @} -#endif diff --git a/Src/DasherCore/DemoFilter.h b/Src/DasherCore/DemoFilter.h index efe57a678..a9ca12227 100644 --- a/Src/DasherCore/DemoFilter.h +++ b/Src/DasherCore/DemoFilter.h @@ -1,5 +1,4 @@ -#ifndef __DEMO_FILTER_H__ -#define __DEMO_FILTER_H__ +#pragma once #include "DynamicFilter.h" @@ -26,4 +25,3 @@ class CDemoFilter : public CDynamicFilter { } /// @} -#endif diff --git a/Src/DasherCore/DynamicButtons.h b/Src/DasherCore/DynamicButtons.h index 5198fec63..07270ca4d 100644 --- a/Src/DasherCore/DynamicButtons.h +++ b/Src/DasherCore/DynamicButtons.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __DynamicButtons_h__ -#define __DynamicButtons_h__ +#pragma once #include "DynamicFilter.h" @@ -85,4 +84,3 @@ class CDynamicButtons : public CDynamicFilter { CDasherModel *m_pModel; }; } -#endif diff --git a/Src/DasherCore/DynamicFilter.h b/Src/DasherCore/DynamicFilter.h index 4d2a93781..e384cf9fa 100644 --- a/Src/DasherCore/DynamicFilter.h +++ b/Src/DasherCore/DynamicFilter.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __DynamicFilter_h__ -#define __DynamicFilter_h__ +#pragma once #include "InputFilter.h" #include "SettingsStore.h" @@ -75,4 +74,3 @@ class CDynamicFilter : public CInputFilter { bool m_bPaused; }; } -#endif diff --git a/Src/DasherCore/FileWordGenerator.h b/Src/DasherCore/FileWordGenerator.h index a65858b7d..b1014c3a6 100644 --- a/Src/DasherCore/FileWordGenerator.h +++ b/Src/DasherCore/FileWordGenerator.h @@ -1,5 +1,4 @@ -#ifndef __FileWordGenerator_h__ -#define __FileWordGenerator_h__ +#pragma once #include #include @@ -72,4 +71,3 @@ class CFileWordGenerator : public CWordGeneratorBase, public AbstractParser { }; } -#endif diff --git a/Src/DasherCore/FrameRate.h b/Src/DasherCore/FrameRate.h index 12b96dd9e..71462a3af 100644 --- a/Src/DasherCore/FrameRate.h +++ b/Src/DasherCore/FrameRate.h @@ -6,8 +6,7 @@ // ///////////////////////////////////////////////////////////////////////////// -#ifndef __FrameRate_h__ -#define __FrameRate_h__ +#pragma once #include "SettingsStore.h" @@ -62,5 +61,4 @@ class CFrameRate { }; /// \} } -#endif /* #ifndef __FrameRate_h__ */ diff --git a/Src/DasherCore/GameModule.h b/Src/DasherCore/GameModule.h index a1addf38e..fafda4650 100644 --- a/Src/DasherCore/GameModule.h +++ b/Src/DasherCore/GameModule.h @@ -1,7 +1,6 @@ // GameModule.h -#ifndef __GameModule_h__ -#define __GameModule_h__ +#pragma once #include @@ -162,4 +161,3 @@ class CGameModule { -#endif diff --git a/Src/DasherCore/GameStatistics.h b/Src/DasherCore/GameStatistics.h index 1818e39d3..e3f13d46c 100644 --- a/Src/DasherCore/GameStatistics.h +++ b/Src/DasherCore/GameStatistics.h @@ -1,5 +1,4 @@ -#ifndef __GameStatistics_h__ -#define __GameStatistics_h__ +#pragma once // Code examples modified from C++ Cookbook O'Reilly. // Code use falls under fair use as dicussed in the book @@ -62,4 +61,3 @@ template return std::accumulate(first, last, B(), MemberSumDiffNthPower(pmember,mean,n))/cnt; } -#endif diff --git a/Src/DasherCore/InputFilter.h b/Src/DasherCore/InputFilter.h index 3efb4752d..462cdc6e7 100644 --- a/Src/DasherCore/InputFilter.h +++ b/Src/DasherCore/InputFilter.h @@ -1,5 +1,4 @@ -#ifndef __INPUT_FILTER_H__ -#define __INPUT_FILTER_H__ +#pragma once #include "DasherView.h" #include "DasherModel.h" @@ -89,4 +88,3 @@ class CInputFilter : public CDasherModule { } /// @} -#endif diff --git a/Src/DasherCore/LanguageModelling/CTWLanguageModel.h b/Src/DasherCore/LanguageModelling/CTWLanguageModel.h index 85a877f1b..9214e62f5 100644 --- a/Src/DasherCore/LanguageModelling/CTWLanguageModel.h +++ b/Src/DasherCore/LanguageModelling/CTWLanguageModel.h @@ -22,8 +22,7 @@ // http://www.sps.ele.tue.nl/members/F.M.J.Willems/RESEARCH_files/CTW/ResearchCTW.htm // -#ifndef __CTWLanguageModel_h__ -#define __CTWLanguageModel_h__ +#pragma once #include #include "LanguageModel.h" @@ -126,4 +125,3 @@ namespace Dasher { } // end namespace -#endif // __LanguageModelling__CTWLanguageModel_h__ diff --git a/Src/DasherCore/LanguageModelling/DictLanguageModel.h b/Src/DasherCore/LanguageModelling/DictLanguageModel.h index ca7478f09..04c8920eb 100644 --- a/Src/DasherCore/LanguageModelling/DictLanguageModel.h +++ b/Src/DasherCore/LanguageModelling/DictLanguageModel.h @@ -6,8 +6,7 @@ // ///////////////////////////////////////////////////////////////////////////// -#ifndef __DictLanguageModel_h__ -#define __DictLanguageModel_h__ +#pragma once #include "../../Common/Allocators/PooledAlloc.h" #include "../Alphabet/AlphInfo.h" @@ -153,4 +152,3 @@ namespace Dasher { } // end namespace Dasher -#endif /* #ifndef __DictLanguageModel_H__ */ diff --git a/Src/DasherCore/LanguageModelling/HashTable.h b/Src/DasherCore/LanguageModelling/HashTable.h index ab3cf55af..893429661 100644 --- a/Src/DasherCore/LanguageModelling/HashTable.h +++ b/Src/DasherCore/LanguageModelling/HashTable.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __Hashtable_h__ -#define __Hashtable_h__ +#pragma once namespace Dasher { @@ -35,4 +34,3 @@ namespace Dasher { } // end namespace -#endif // __Hashtable_h__ diff --git a/Src/DasherCore/LanguageModelling/LanguageModel.h b/Src/DasherCore/LanguageModelling/LanguageModel.h index 825e7bc69..d297e9907 100644 --- a/Src/DasherCore/LanguageModelling/LanguageModel.h +++ b/Src/DasherCore/LanguageModelling/LanguageModel.h @@ -6,8 +6,7 @@ // ///////////////////////////////////////////////////////////////////////////// -#ifndef __LanguageModelling_LanguageModel_h__ -#define __LanguageModelling_LanguageModel_h__ +#pragma once #include @@ -155,4 +154,3 @@ class Dasher::CLanguageModel ///////////////////////////////////////////////////////////////////////////// -#endif // ndef __LanguageModelling_LanguageModel_h__ diff --git a/Src/DasherCore/LanguageModelling/MixtureLanguageModel.h b/Src/DasherCore/LanguageModelling/MixtureLanguageModel.h index b38e3c6f2..af9444e27 100644 --- a/Src/DasherCore/LanguageModelling/MixtureLanguageModel.h +++ b/Src/DasherCore/LanguageModelling/MixtureLanguageModel.h @@ -6,8 +6,7 @@ // ///////////////////////////////////////////////////////////////////////////// -#ifndef __LanguageModelling_MixtureLanguageModel_h__ -#define __LanguageModelling_MixtureLanguageModel_h__ +#pragma once #include "LanguageModel.h" #include "PPMLanguageModel.h" @@ -174,4 +173,3 @@ namespace Dasher { ///////////////////////////////////////////////////////////////////////////// -#endif // ndef __LanguageModelling_MixtureLanguageModel_h__ diff --git a/Src/DasherCore/LanguageModelling/PPMLanguageModel.h b/Src/DasherCore/LanguageModelling/PPMLanguageModel.h index e826ec100..d96192eab 100644 --- a/Src/DasherCore/LanguageModelling/PPMLanguageModel.h +++ b/Src/DasherCore/LanguageModelling/PPMLanguageModel.h @@ -6,8 +6,7 @@ // ///////////////////////////////////////////////////////////////////////////// -#ifndef __PPMLanguageModel_h__ -#define __PPMLanguageModel_h__ +#pragma once #include "../../Common/NoClones.h" #include "../../Common/Allocators/PooledAlloc.h" @@ -220,4 +219,3 @@ namespace Dasher { } } // end namespace Dasher -#endif // __LanguageModelling__PPMLanguageModel_h__ diff --git a/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h b/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h index bd7e5ec79..0d03baafd 100644 --- a/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h +++ b/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h @@ -10,8 +10,7 @@ // ///////////////////////////////////////////////////////////////////////////// -#ifndef __PPMPYLanguageModel_h__ -#define __PPMPYLanguageModel_h__ +#pragma once #include "PPMLanguageModel.h" #include "DasherTypes.h" @@ -85,4 +84,3 @@ namespace Dasher { /// @} } // end namespace Dasher -#endif // __LanguageModelling__PPMPYLanguageModel_h__ diff --git a/Src/DasherCore/LanguageModelling/RoutingPPMLanguageModel.h b/Src/DasherCore/LanguageModelling/RoutingPPMLanguageModel.h index 9a9ad92a4..02cd77bab 100644 --- a/Src/DasherCore/LanguageModelling/RoutingPPMLanguageModel.h +++ b/Src/DasherCore/LanguageModelling/RoutingPPMLanguageModel.h @@ -6,8 +6,7 @@ // Copyright 2011 Cambridge University. All rights reserved. // -#ifndef __RoutingPPMLanguageModel_h__ -#define __RoutingPPMLanguageModel_h__ +#pragma once #include "PPMLanguageModel.h" @@ -90,4 +89,3 @@ namespace Dasher { /// @} } // end namespace Dasher -#endif diff --git a/Src/DasherCore/LanguageModelling/WordLanguageModel.h b/Src/DasherCore/LanguageModelling/WordLanguageModel.h index b7105e3cb..9736374f7 100644 --- a/Src/DasherCore/LanguageModelling/WordLanguageModel.h +++ b/Src/DasherCore/LanguageModelling/WordLanguageModel.h @@ -6,8 +6,7 @@ // ///////////////////////////////////////////////////////////////////////////// -#ifndef __WordLanguageModel_h__ -#define __WordLanguageModel_h__ +#pragma once #include "../../Common/Allocators/PooledAlloc.h" #include "PPMLanguageModel.h" @@ -186,4 +185,3 @@ namespace Dasher { } // end namespace Dasher -#endif /* #ifndef __WordLanguageModel_H__ */ diff --git a/Src/DasherCore/MandarinAlphMgr.h b/Src/DasherCore/MandarinAlphMgr.h index 09833a1cb..b0b16895e 100644 --- a/Src/DasherCore/MandarinAlphMgr.h +++ b/Src/DasherCore/MandarinAlphMgr.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __mandarinalphmgr_h__ -#define __mandarinalphmgr_h__ +#pragma once #include "AlphabetManager.h" #include @@ -258,4 +257,3 @@ namespace Dasher { } -#endif diff --git a/Src/DasherCore/NodeCreationManager.h b/Src/DasherCore/NodeCreationManager.h index 499b9e2f6..6cf3a7ac3 100644 --- a/Src/DasherCore/NodeCreationManager.h +++ b/Src/DasherCore/NodeCreationManager.h @@ -1,5 +1,4 @@ -#ifndef __NodeCreationManager_h__ -#define __NodeCreationManager_h__ +#pragma once #include "AlphabetManager.h" #include "ConversionManager.h" @@ -61,4 +60,3 @@ class CNodeCreationManager { }; /// @} -#endif diff --git a/Src/DasherCore/NodeManager.h b/Src/DasherCore/NodeManager.h index d122cc194..b2e00467f 100644 --- a/Src/DasherCore/NodeManager.h +++ b/Src/DasherCore/NodeManager.h @@ -1,5 +1,4 @@ -#ifndef __nodemanager_h__ -#define __nodemanager_h__ +#pragma once namespace Dasher { /// A marker class for anything that can be returned by CDasherNode::mgr() @@ -9,4 +8,3 @@ namespace Dasher { virtual ~CNodeManager() = default; }; } -#endif diff --git a/Src/DasherCore/OneButtonDynamicFilter.h b/Src/DasherCore/OneButtonDynamicFilter.h index 19db10d04..41d518d05 100644 --- a/Src/DasherCore/OneButtonDynamicFilter.h +++ b/Src/DasherCore/OneButtonDynamicFilter.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __ONE_BUTTON_DYNAMIC_FILTER_H__ -#define __ONE_BUTTON_DYNAMIC_FILTER_H__ +#pragma once #include "ButtonMultiPress.h" @@ -52,4 +51,3 @@ class COneButtonDynamicFilter : public CButtonMultiPress { } /// @} -#endif diff --git a/Src/DasherCore/OneButtonFilter.h b/Src/DasherCore/OneButtonFilter.h index e854838d6..74dfd3163 100644 --- a/Src/DasherCore/OneButtonFilter.h +++ b/Src/DasherCore/OneButtonFilter.h @@ -1,5 +1,4 @@ -#ifndef __ONE_BUTTON_FILTER_H__ -#define __ONE_BUTTON_FILTER_H__ +#pragma once #include "InputFilter.h" #include "SettingsStore.h" @@ -25,4 +24,3 @@ class COneButtonFilter : public CStaticFilter { } /// @} -#endif diff --git a/Src/DasherCore/OneDimensionalFilter.h b/Src/DasherCore/OneDimensionalFilter.h index 65ac14d46..9aa6e03af 100644 --- a/Src/DasherCore/OneDimensionalFilter.h +++ b/Src/DasherCore/OneDimensionalFilter.h @@ -1,5 +1,4 @@ -#ifndef __ONE_DIMENSIONAL_FILTER_H__ -#define __ONE_DIMENSIONAL_FILTER_H__ +#pragma once #include @@ -40,4 +39,3 @@ class C1DCircleStartHandler : public CCircleStartHandler { } /// @} -#endif diff --git a/Src/DasherCore/RoutingAlphMgr.h b/Src/DasherCore/RoutingAlphMgr.h index 0331e5c5a..e6576057c 100644 --- a/Src/DasherCore/RoutingAlphMgr.h +++ b/Src/DasherCore/RoutingAlphMgr.h @@ -6,8 +6,7 @@ // Copyright 2011 Cambridge University. All rights reserved. // -#ifndef __RoutingAlphMgr_h__ -#define __RoutingAlphMgr_h__ +#pragma once #include "AlphabetManager.h" @@ -111,4 +110,3 @@ namespace Dasher { } -#endif diff --git a/Src/DasherCore/SCENode.h b/Src/DasherCore/SCENode.h index f061008be..38c29d41a 100644 --- a/Src/DasherCore/SCENode.h +++ b/Src/DasherCore/SCENode.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __SCENODE_H__ -#define __SCENODE_H__ +#pragma once /*Common Node Definition for Chinese Pinyin (possibly also Japanese) Conversion Library and Dasher ConversionManager*/ @@ -75,5 +74,4 @@ class SCENode { }; /// \} -#endif diff --git a/Src/DasherCore/ScreenGameModule.h b/Src/DasherCore/ScreenGameModule.h index 6f66cedcc..702103d8b 100644 --- a/Src/DasherCore/ScreenGameModule.h +++ b/Src/DasherCore/ScreenGameModule.h @@ -19,8 +19,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __SCREEN_GAME_MODULE_H__ -#define __SCREEN_GAME_MODULE_H__ +#pragma once #include "GameModule.h" @@ -39,4 +38,3 @@ namespace Dasher { }; } -#endif diff --git a/Src/DasherCore/SettingsStore.h b/Src/DasherCore/SettingsStore.h index c33626940..c655d6f22 100644 --- a/Src/DasherCore/SettingsStore.h +++ b/Src/DasherCore/SettingsStore.h @@ -6,8 +6,7 @@ // ///////////////////////////////////////////////////////////////////////////// -#ifndef __SettingsStore_h__ -#define __SettingsStore_h__ +#pragma once #include #include @@ -120,4 +119,3 @@ class CSettingsStore { std::unordered_map parameters_; }; } -#endif /* #ifndef __SettingsStore_h__ */ diff --git a/Src/DasherCore/SimpleTimer.h b/Src/DasherCore/SimpleTimer.h index 65bfdc7d9..c78256b23 100644 --- a/Src/DasherCore/SimpleTimer.h +++ b/Src/DasherCore/SimpleTimer.h @@ -3,8 +3,7 @@ // // Copyright 2004 by Keith Vertanen -#ifndef __SIMPLE_TIMER_H__ -#define __SIMPLE_TIMER_H__ +#pragma once #include @@ -23,5 +22,4 @@ class CSimpleTimer }; /// \} -#endif diff --git a/Src/DasherCore/SocketInput.h b/Src/DasherCore/SocketInput.h index 90920b0ff..9488edc35 100644 --- a/Src/DasherCore/SocketInput.h +++ b/Src/DasherCore/SocketInput.h @@ -4,8 +4,7 @@ // // Linux-specific subclass of SocketInputBase: provides network socket control of Dasher cursor -#ifndef __SocketInput_h__ -#define __SocketInput_h__ +#pragma once #ifndef _WIN32 @@ -62,4 +61,3 @@ class CSocketInput:public CSocketInputBase { } /// \} #endif -#endif diff --git a/Src/DasherCore/SocketInputBase.h b/Src/DasherCore/SocketInputBase.h index bd8c1c8e8..d46d472e9 100644 --- a/Src/DasherCore/SocketInputBase.h +++ b/Src/DasherCore/SocketInputBase.h @@ -6,8 +6,7 @@ #ifndef _WIN32 -#ifndef __socketinputbase_h__ -#define __socketinputbase_h__ +#pragma once #include "DasherInput.h" #include "SettingsStore.h" @@ -134,4 +133,3 @@ class CSocketInputBase : public CScreenCoordInput, public CSettingsUserObserver #endif -#endif diff --git a/Src/DasherCore/StartHandler.h b/Src/DasherCore/StartHandler.h index caa83667c..7ccd41783 100644 --- a/Src/DasherCore/StartHandler.h +++ b/Src/DasherCore/StartHandler.h @@ -1,5 +1,4 @@ -#ifndef __START_HANDLER_H__ -#define __START_HANDLER_H__ +#pragma once #include "DasherTypes.h" @@ -25,4 +24,3 @@ class CStartHandler { } /// @} -#endif diff --git a/Src/DasherCore/StylusFilter.h b/Src/DasherCore/StylusFilter.h index 2ffbfebe1..eb6578916 100644 --- a/Src/DasherCore/StylusFilter.h +++ b/Src/DasherCore/StylusFilter.h @@ -1,5 +1,4 @@ -#ifndef __STYLUS_FILTER_H__ -#define __STYLUS_FILTER_H__ +#pragma once #include @@ -36,4 +35,3 @@ class CStylusFilter : public CDefaultFilter, protected CZoomAdjuster { } /// @} -#endif diff --git a/Src/DasherCore/TimeSpan.h b/Src/DasherCore/TimeSpan.h index a4d016a1a..030b23fd5 100644 --- a/Src/DasherCore/TimeSpan.h +++ b/Src/DasherCore/TimeSpan.h @@ -7,8 +7,7 @@ // // Copyright 2005 by Keith Vertanen -#ifndef __TIME_SPAN_H__ -#define __TIME_SPAN_H__ +#pragma once #include "FileLogger.h" #include @@ -56,4 +55,3 @@ class CTimeSpan }; /// @} -#endif diff --git a/Src/DasherCore/Trainer.h b/Src/DasherCore/Trainer.h index 06c093030..737a86b52 100644 --- a/Src/DasherCore/Trainer.h +++ b/Src/DasherCore/Trainer.h @@ -1,5 +1,4 @@ -#ifndef __trainer_h__ -#define __trainer_h__ +#pragma once #include "Alphabet/AlphInfo.h" #include "AbstractXMLParser.h" @@ -55,4 +54,3 @@ namespace Dasher { } -#endif diff --git a/Src/DasherCore/TwoBoxStartHandler.h b/Src/DasherCore/TwoBoxStartHandler.h index 15a097d29..169f2044b 100644 --- a/Src/DasherCore/TwoBoxStartHandler.h +++ b/Src/DasherCore/TwoBoxStartHandler.h @@ -1,5 +1,4 @@ -#ifndef __TWO_BOX_START_HANDLER_H__ -#define __TWO_BOX_START_HANDLER_H__ +#pragma once #include "StartHandler.h" #include "SettingsStore.h" @@ -27,4 +26,3 @@ class CTwoBoxStartHandler : public CStartHandler { } /// @} -#endif diff --git a/Src/DasherCore/TwoButtonDynamicFilter.h b/Src/DasherCore/TwoButtonDynamicFilter.h index 0e7b982d7..6bc1f76e0 100644 --- a/Src/DasherCore/TwoButtonDynamicFilter.h +++ b/Src/DasherCore/TwoButtonDynamicFilter.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __TWO_BUTTON_DYNAMIC_FILTER_H__ -#define __TWO_BUTTON_DYNAMIC_FILTER_H__ +#pragma once #include "ButtonMultiPress.h" @@ -59,4 +58,3 @@ class CTwoButtonDynamicFilter : public CButtonMultiPress { } /// @} -#endif diff --git a/Src/DasherCore/TwoPushDynamicFilter.h b/Src/DasherCore/TwoPushDynamicFilter.h index aa85697e0..8ddbf408d 100644 --- a/Src/DasherCore/TwoPushDynamicFilter.h +++ b/Src/DasherCore/TwoPushDynamicFilter.h @@ -18,8 +18,7 @@ // along with Dasher; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#ifndef __TWO_PUSH_DYNAMIC_FILTER_H__ -#define __TWO_PUSH_DYNAMIC_FILTER_H__ +#pragma once #include "DynamicButtons.h" namespace Dasher { @@ -74,4 +73,3 @@ namespace Dasher { } /// @} -#endif diff --git a/Src/DasherCore/UserButton.h b/Src/DasherCore/UserButton.h index 5ddf93d82..4e197b548 100644 --- a/Src/DasherCore/UserButton.h +++ b/Src/DasherCore/UserButton.h @@ -1,5 +1,4 @@ -#ifndef __UserButton_h__ -#define __UserButton_h__ +#pragma once #include "FileLogger.h" #include @@ -37,4 +36,3 @@ class CUserButton { }; /// \} -#endif diff --git a/Src/DasherCore/UserLocation.h b/Src/DasherCore/UserLocation.h index 2b3365b5f..ac6aaf852 100644 --- a/Src/DasherCore/UserLocation.h +++ b/Src/DasherCore/UserLocation.h @@ -7,8 +7,7 @@ // // Copyright 2005 by Keith Vertanen -#ifndef __USER_LOCATION_H__ -#define __USER_LOCATION_H__ +#pragma once #include "FileLogger.h" #include @@ -57,4 +56,3 @@ class CUserLocation }; /// @} -#endif diff --git a/Src/DasherCore/UserLog.h b/Src/DasherCore/UserLog.h index 873a4c842..c1d938b71 100644 --- a/Src/DasherCore/UserLog.h +++ b/Src/DasherCore/UserLog.h @@ -22,8 +22,7 @@ // // Copyright 2005 by Keith Vertanen -#ifndef __USER_LOG_H__ -#define __USER_LOG_H__ +#pragma once #include "FileLogger.h" #include @@ -153,4 +152,3 @@ class CUserLog : public CUserLogBase { }; /// @} -#endif diff --git a/Src/DasherCore/UserLogBase.h b/Src/DasherCore/UserLogBase.h index e1eae1cf4..8c7f552fa 100644 --- a/Src/DasherCore/UserLogBase.h +++ b/Src/DasherCore/UserLogBase.h @@ -1,5 +1,4 @@ -#ifndef __UserLogBase_h__ -#define __UserLogBase_h__ +#pragma once #include "DasherTypes.h" #include "UserLogTrial.h" // Don't want to include this, but needed for event type enum @@ -52,4 +51,3 @@ class CUserLogBase { }; /// @} -#endif diff --git a/Src/DasherCore/UserLogParam.h b/Src/DasherCore/UserLogParam.h index bfdbe127f..51fec59a3 100644 --- a/Src/DasherCore/UserLogParam.h +++ b/Src/DasherCore/UserLogParam.h @@ -1,6 +1,5 @@ -#ifndef __USER_LOG_PARAM_H__ -#define __USER_LOG_PARAM_H__ +#pragma once // Class that stores a particular parameter // @@ -50,5 +49,4 @@ class CUserLogParam }; /// @} -#endif diff --git a/Src/DasherCore/UserLogTrial.h b/Src/DasherCore/UserLogTrial.h index badb7598b..9bdc3aab6 100644 --- a/Src/DasherCore/UserLogTrial.h +++ b/Src/DasherCore/UserLogTrial.h @@ -4,8 +4,7 @@ // // Copyright 2005 by Keith Vertanen -#ifndef __USER_LOG_TRIAL_H__ -#define __USER_LOG_TRIAL_H__ +#pragma once #include "FileLogger.h" #include @@ -152,4 +151,3 @@ class CUserLogTrial }; /// @} -#endif diff --git a/Src/DasherCore/WordGeneratorBase.h b/Src/DasherCore/WordGeneratorBase.h index 6161be8f8..c3714f56f 100644 --- a/Src/DasherCore/WordGeneratorBase.h +++ b/Src/DasherCore/WordGeneratorBase.h @@ -1,5 +1,4 @@ -#ifndef __WordGeneratorBase_h__ -#define __WordGeneratorBase_h__ +#pragma once #include #include "Alphabet/AlphabetMap.h" @@ -48,4 +47,3 @@ class CWordGeneratorBase { }; } -#endif diff --git a/Src/DasherCore/XMLUtil.h b/Src/DasherCore/XMLUtil.h index c6b5ccb6c..b3d7a1869 100644 --- a/Src/DasherCore/XMLUtil.h +++ b/Src/DasherCore/XMLUtil.h @@ -6,8 +6,7 @@ // // Copyright 2005 by Keith Vertanen -#ifndef __XML_UTIL_H__ -#define __XML_UTIL_H__ +#pragma once #include #include @@ -62,5 +61,4 @@ class XMLUtil }; /// @} -#endif From 791d4525e40554766aeda30a3eae86fd4d4caf59 Mon Sep 17 00:00:00 2001 From: Sebastian Pape Date: Mon, 31 Mar 2025 18:01:57 +0200 Subject: [PATCH 3/3] Fixing fileutils include guards --- Src/DasherCore/FileUtils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Src/DasherCore/FileUtils.cpp b/Src/DasherCore/FileUtils.cpp index c5d8edc27..73c9f1cbe 100644 --- a/Src/DasherCore/FileUtils.cpp +++ b/Src/DasherCore/FileUtils.cpp @@ -1,8 +1,9 @@ -#include #ifndef HAVE_OWN_FILEUTILS #include "FileUtils.h" + #include #include +#include static bool IsFileWriteable(const std::filesystem::path &file_path) {