From b35a0c567489f3f78d40aed93e8f6b4f1014efd6 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Mon, 9 Nov 2020 00:06:29 +0200 Subject: [PATCH] cleanup: include guards --- AMBEFEC.h | 5 +---- BCH.h | 5 +---- BPTC19696.h | 5 +---- CASTInfo.h | 5 +---- CRC.h | 5 +---- Conf.h | 5 +---- DMRAccessControl.h | 6 ++---- DMRCSBK.h | 5 +---- DMRControl.h | 5 +---- DMRData.h | 5 +---- DMRDataHeader.h | 6 +----- DMRDefines.h | 5 +---- DMREMB.h | 5 +---- DMREmbeddedData.h | 5 +---- DMRFullLC.h | 6 +----- DMRLC.h | 6 +----- DMRNetwork.h | 5 +---- DMRShortLC.h | 5 +---- DMRSlot.h | 5 +---- DMRSlotType.h | 5 +---- DMRTA.h | 5 +---- DMRTrellis.h | 5 +---- Defines.h | 5 +---- Display.h | 5 +---- Golay2087.h | 5 +---- Golay24128.h | 5 +---- Hamming.h | 5 +---- I2CController.h | 5 +---- Log.h | 5 +---- MMDVMHost.h | 5 +---- Modem.h | 5 +---- ModemSerialPort.h | 5 +---- NetworkInfo.h | 5 +---- Nextion.h | 5 +---- NullDisplay.h | 5 +---- NullModem.h | 5 +---- POCSAGControl.h | 5 +---- POCSAGDefines.h | 5 +---- POCSAGNetwork.h | 5 +---- QR1676.h | 5 +---- RS129.h | 5 +---- RSSIInterpolator.h | 5 +---- RingBuffer.h | 5 +---- SHA256.h | 5 +---- SerialController.h | 5 +---- SerialPort.h | 5 +---- StopWatch.h | 4 +--- Sync.h | 5 +---- TFTSerial.h | 5 +---- Timer.h | 5 +---- UDPSocket.h | 5 +---- UMP.h | 5 +---- Utils.h | 5 +---- 53 files changed, 54 insertions(+), 214 deletions(-) diff --git a/AMBEFEC.h b/AMBEFEC.h index f6573b3c..bceeb46e 100644 --- a/AMBEFEC.h +++ b/AMBEFEC.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(AMBEFEC_H) -#define AMBEFEC_H +#pragma once class CAMBEFEC { public: @@ -29,5 +28,3 @@ class CAMBEFEC { private: unsigned int regenerateDMR(unsigned int& a, unsigned int& b,unsigned int& c) const; }; - -#endif diff --git a/BCH.h b/BCH.h index fa1265d3..6432b58a 100644 --- a/BCH.h +++ b/BCH.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(BCH_H) -#define BCH_H +#pragma once class CBCH { public: @@ -29,5 +28,3 @@ class CBCH { private: void encode(const int* data, int* bb); }; - -#endif diff --git a/BPTC19696.h b/BPTC19696.h index 0a40a782..51b4d011 100644 --- a/BPTC19696.h +++ b/BPTC19696.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(BPTC19696_H) -#define BPTC19696_H +#pragma once class CBPTC19696 { @@ -43,5 +42,3 @@ class CBPTC19696 void encodeErrorCheck(); void encodeExtractBinary(unsigned char* data); }; - -#endif diff --git a/CASTInfo.h b/CASTInfo.h index b3f00b4e..272b58bb 100644 --- a/CASTInfo.h +++ b/CASTInfo.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(CASTINFO_H) -#define CASTINFO_H +#pragma once #include "Display.h" @@ -54,5 +53,3 @@ class CCASTInfo : public CDisplay CModem* m_modem; std::string m_ipaddress; }; - -#endif diff --git a/CRC.h b/CRC.h index e80c3f6e..e8529967 100644 --- a/CRC.h +++ b/CRC.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(CRC_H) -#define CRC_H +#pragma once class CCRC { @@ -33,5 +32,3 @@ class CCRC static unsigned char crc8(const unsigned char* in, unsigned int length); }; - -#endif diff --git a/Conf.h b/Conf.h index 9cb42dcc..98f78009 100644 --- a/Conf.h +++ b/Conf.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(CONF_H) -#define CONF_H +#pragma once #include #include @@ -259,5 +258,3 @@ class CConf unsigned int m_nextionScreenLayout; bool m_nextionTempInFahrenheit; }; - -#endif diff --git a/DMRAccessControl.h b/DMRAccessControl.h index 7d4aec13..13590f57 100644 --- a/DMRAccessControl.h +++ b/DMRAccessControl.h @@ -15,8 +15,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software */ -#if !defined(DMRAccessControl_H) -#define DMRAccessControl_H + +#pragma once #include @@ -40,5 +40,3 @@ class CDMRAccessControl { static bool m_selfOnly; static unsigned int m_id; }; - -#endif diff --git a/DMRCSBK.h b/DMRCSBK.h index 7faf7b97..26afe519 100644 --- a/DMRCSBK.h +++ b/DMRCSBK.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(DMRCSBK_H) -#define DMRCSBK_H +#pragma once #include "DMRDefines.h" @@ -76,5 +75,3 @@ class CDMRCSBK bool m_dataContent; unsigned char m_CBF; }; - -#endif diff --git a/DMRControl.h b/DMRControl.h index 5df8a3cb..d0152a51 100644 --- a/DMRControl.h +++ b/DMRControl.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(DMRControl_H) -#define DMRControl_H +#pragma once #include "RSSIInterpolator.h" #include "DMRNetwork.h" @@ -54,5 +53,3 @@ class CDMRControl { CDMRSlot m_slot1; CDMRSlot m_slot2; }; - -#endif diff --git a/DMRData.h b/DMRData.h index c5dc4fc2..88d69601 100644 --- a/DMRData.h +++ b/DMRData.h @@ -11,8 +11,7 @@ * GNU General Public License for more details. */ -#ifndef DMRData_H -#define DMRData_H +#pragma once #include "DMRDefines.h" @@ -66,5 +65,3 @@ class CDMRData { unsigned char m_ber; unsigned char m_rssi; }; - -#endif diff --git a/DMRDataHeader.h b/DMRDataHeader.h index 97c60361..afb16d53 100644 --- a/DMRDataHeader.h +++ b/DMRDataHeader.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef DMRDataHeader_H -#define DMRDataHeader_H +#pragma once class CDMRDataHeader { @@ -49,6 +48,3 @@ class CDMRDataHeader bool m_S; unsigned char m_Ns; }; - -#endif - diff --git a/DMRDefines.h b/DMRDefines.h index 5b53c33d..236a85c9 100644 --- a/DMRDefines.h +++ b/DMRDefines.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(DMRDefines_H) -#define DMRDefines_H +#pragma once #include "Defines.h" // For TAG_DATA @@ -119,5 +118,3 @@ enum FLCO { FLCO_TALKER_ALIAS_BLOCK3 = 7, FLCO_GPS_INFO = 8 }; - -#endif diff --git a/DMREMB.h b/DMREMB.h index 517be1eb..bbde3b11 100644 --- a/DMREMB.h +++ b/DMREMB.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(DMREMB_H) -#define DMREMB_H +#pragma once class CDMREMB { @@ -42,5 +41,3 @@ class CDMREMB bool m_PI; unsigned char m_LCSS; }; - -#endif diff --git a/DMREmbeddedData.h b/DMREmbeddedData.h index 7222dcd5..447dc5ad 100644 --- a/DMREmbeddedData.h +++ b/DMREmbeddedData.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef DMREmbeddedData_H -#define DMREmbeddedData_H +#pragma once #include "DMRDefines.h" #include "DMRLC.h" @@ -59,5 +58,3 @@ class CDMREmbeddedData void decodeEmbeddedData(); void encodeEmbeddedData(); }; - -#endif diff --git a/DMRFullLC.h b/DMRFullLC.h index d3294efe..0debe4dd 100644 --- a/DMRFullLC.h +++ b/DMRFullLC.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef DMRFullLC_H -#define DMRFullLC_H +#pragma once #include "DMRLC.h" #include "DMRSlotType.h" @@ -37,6 +36,3 @@ class CDMRFullLC private: CBPTC19696 m_bptc; }; - -#endif - diff --git a/DMRLC.h b/DMRLC.h index 3a394504..ae9023a1 100644 --- a/DMRLC.h +++ b/DMRLC.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(DMRLC_H) -#define DMRLC_H +#pragma once #include "DMRDefines.h" @@ -60,6 +59,3 @@ class CDMRLC unsigned int m_srcId; unsigned int m_dstId; }; - -#endif - diff --git a/DMRNetwork.h b/DMRNetwork.h index 29e9ab0f..93c3f7fe 100644 --- a/DMRNetwork.h +++ b/DMRNetwork.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(DMRNetwork_H) -#define DMRNetwork_H +#pragma once #include "UDPSocket.h" #include "Timer.h" @@ -113,5 +112,3 @@ class CDMRNetwork bool write(const unsigned char* data, unsigned int length); }; - -#endif diff --git a/DMRShortLC.h b/DMRShortLC.h index af215890..a3c3f32c 100644 --- a/DMRShortLC.h +++ b/DMRShortLC.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(DMRSHORTLC_H) -#define DMRSHORTLC_H +#pragma once class CDMRShortLC { @@ -43,5 +42,3 @@ class CDMRShortLC void encodeErrorCheck(); void encodeExtractBinary(unsigned char* data); }; - -#endif diff --git a/DMRSlot.h b/DMRSlot.h index 9aa8f7cc..50ad1b49 100644 --- a/DMRSlot.h +++ b/DMRSlot.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(DMRSlot_H) -#define DMRSlot_H +#pragma once #include "RSSIInterpolator.h" #include "DMREmbeddedData.h" @@ -152,5 +151,3 @@ class CDMRSlot { static void setShortLC(unsigned int slotNo, unsigned int id, FLCO flco = FLCO_GROUP, ACTIVITY_TYPE type = ACTIVITY_NONE); }; - -#endif diff --git a/DMRSlotType.h b/DMRSlotType.h index e76821f1..f19c224e 100644 --- a/DMRSlotType.h +++ b/DMRSlotType.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(DMRSLOTTYPE_H) -#define DMRSLOTTYPE_H +#pragma once class CDMRSlotType { @@ -38,5 +37,3 @@ class CDMRSlotType unsigned char m_colorCode; unsigned char m_dataType; }; - -#endif diff --git a/DMRTA.h b/DMRTA.h index d53f93f5..7381b966 100644 --- a/DMRTA.h +++ b/DMRTA.h @@ -12,8 +12,7 @@ * GNU General Public License for more details. */ -#ifndef DMRTA_H -#define DMRTA_H +#pragma once class CDMRTA { public: @@ -31,5 +30,3 @@ class CDMRTA { char m_TA[32]; unsigned char m_buf[32]; }; - -#endif diff --git a/DMRTrellis.h b/DMRTrellis.h index 55ed0c02..9c875d77 100644 --- a/DMRTrellis.h +++ b/DMRTrellis.h @@ -11,8 +11,7 @@ * GNU General Public License for more details. */ -#ifndef DMRTrellis_H -#define DMRTrellis_H +#pragma once class CDMRTrellis { public: @@ -32,5 +31,3 @@ class CDMRTrellis { bool fixCode(unsigned char* points, unsigned int failPos, unsigned char* payload) const; unsigned int checkCode(const unsigned char* points, unsigned char* tribits) const; }; - -#endif diff --git a/Defines.h b/Defines.h index a3eec925..1a871fba 100644 --- a/Defines.h +++ b/Defines.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(Defines_H) -#define Defines_H +#pragma once const unsigned char MODE_IDLE = 0U; const unsigned char MODE_DMR = 2U; @@ -73,5 +72,3 @@ enum DMR_OVCM_TYPES { DMR_OVCM_TX_ON, DMR_OVCM_ON }; - -#endif diff --git a/Display.h b/Display.h index a0415b11..6088ba29 100644 --- a/Display.h +++ b/Display.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(DISPLAY_H) -#define DISPLAY_H +#pragma once #include "Timer.h" @@ -85,5 +84,3 @@ class CDisplay unsigned char m_mode1; unsigned char m_mode2; }; - -#endif diff --git a/Golay2087.h b/Golay2087.h index d54daed5..5de112c6 100644 --- a/Golay2087.h +++ b/Golay2087.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef Golay2087_H -#define Golay2087_H +#pragma once class CGolay2087 { public: @@ -28,5 +27,3 @@ class CGolay2087 { private: static unsigned int getSyndrome1987(unsigned int pattern); }; - -#endif diff --git a/Golay24128.h b/Golay24128.h index 1ac7852f..23f144fd 100644 --- a/Golay24128.h +++ b/Golay24128.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef Golay24128_H -#define Golay24128_H +#pragma once class CGolay24128 { public: @@ -28,5 +27,3 @@ class CGolay24128 { static unsigned int decode24128(unsigned int code); static unsigned int decode24128(unsigned char* bytes); }; - -#endif diff --git a/Hamming.h b/Hamming.h index 393e0054..9cdf1378 100644 --- a/Hamming.h +++ b/Hamming.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef Hamming_H -#define Hamming_H +#pragma once class CHamming { public: @@ -39,5 +38,3 @@ class CHamming { static void encode17123(bool* d); static bool decode17123(bool* d); }; - -#endif diff --git a/I2CController.h b/I2CController.h index 6e596727..fd83ffcd 100644 --- a/I2CController.h +++ b/I2CController.h @@ -17,8 +17,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef I2CController_H -#define I2CController_H +#pragma once #include "SerialController.h" @@ -36,5 +35,3 @@ class CI2CController : public CSerialController { private: unsigned int m_address; }; - -#endif diff --git a/Log.h b/Log.h index e393d5b2..3fd8efe9 100644 --- a/Log.h +++ b/Log.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(LOG_H) -#define LOG_H +#pragma once #include @@ -32,5 +31,3 @@ extern void Log(unsigned int level, const char* fmt, ...); extern bool LogInitialise(const std::string& filePath, const std::string& fileRoot, unsigned int fileLevel, unsigned int displayLevel, bool rotate); extern void LogFinalise(); - -#endif diff --git a/MMDVMHost.h b/MMDVMHost.h index fc699b90..a108b0c8 100644 --- a/MMDVMHost.h +++ b/MMDVMHost.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(MMDVMHOST_H) -#define MMDVMHOST_H +#pragma once #include "POCSAGNetwork.h" #include "POCSAGControl.h" @@ -73,5 +72,3 @@ class CMMDVMHost void setMode(unsigned char mode); }; - -#endif diff --git a/Modem.h b/Modem.h index 1da54853..90e40771 100644 --- a/Modem.h +++ b/Modem.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef MODEM_H -#define MODEM_H +#pragma once #include "SerialController.h" #include "RingBuffer.h" @@ -151,5 +150,3 @@ class CModem { RESP_TYPE_MMDVM getResponse(); }; - -#endif diff --git a/ModemSerialPort.h b/ModemSerialPort.h index d6761cec..553f59a6 100644 --- a/ModemSerialPort.h +++ b/ModemSerialPort.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef ModemSerialPort_H -#define ModemSerialPort_H +#pragma once #include "SerialPort.h" #include "Modem.h" @@ -38,5 +37,3 @@ class CModemSerialPort : public ISerialPort { private: CModem* m_modem; }; - -#endif diff --git a/NetworkInfo.h b/NetworkInfo.h index 2febcde9..7d905cbc 100644 --- a/NetworkInfo.h +++ b/NetworkInfo.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(NETWORKINFO_H) -#define NETWORKINFO_H +#pragma once class CNetworkInfo { public: @@ -28,5 +27,3 @@ class CNetworkInfo { private: }; - -#endif diff --git a/Nextion.h b/Nextion.h index b965e538..ea4b6c8d 100644 --- a/Nextion.h +++ b/Nextion.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(NEXTION_H) -#define NEXTION_H +#pragma once #include "Display.h" #include "Defines.h" @@ -85,5 +84,3 @@ class CNextion : public CDisplay void sendCommand(const char* command); void sendCommandAction(unsigned int status); }; - -#endif diff --git a/NullDisplay.h b/NullDisplay.h index 12e17669..44cb12b6 100644 --- a/NullDisplay.h +++ b/NullDisplay.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(NULLDISPLAY_H) -#define NULLDISPLAY_H +#pragma once #include "Display.h" @@ -50,5 +49,3 @@ class CNullDisplay : public CDisplay private: }; - -#endif diff --git a/NullModem.h b/NullModem.h index 03b42c38..63266a34 100644 --- a/NullModem.h +++ b/NullModem.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef NULLMODEM_H -#define NULLMODEM_H +#pragma once #include "Modem.h" #include "Defines.h" @@ -84,5 +83,3 @@ class CNullModem : public CModem { private: HW_TYPE m_hwType; }; - -#endif diff --git a/POCSAGControl.h b/POCSAGControl.h index f101ba51..28fcdc2c 100644 --- a/POCSAGControl.h +++ b/POCSAGControl.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(POCSAGControl_H) -#define POCSAGControl_H +#pragma once #include "POCSAGNetwork.h" #include "POCSAGDefines.h" @@ -82,5 +81,3 @@ class CPOCSAGControl { bool writeFile(const unsigned char* data); void closeFile(); }; - -#endif diff --git a/POCSAGDefines.h b/POCSAGDefines.h index 4b822b31..d69c07f4 100644 --- a/POCSAGDefines.h +++ b/POCSAGDefines.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(POCSAGDEFINES_H) -#define POCSAGDEFINES_H +#pragma once #include @@ -31,5 +30,3 @@ const unsigned int POCSAG_FRAME_ADDRESSES = 8U; const uint32_t POCSAG_SYNC_WORD = 0x7CD215D8U; const uint32_t POCSAG_IDLE_WORD = 0x7A89C197U; - -#endif diff --git a/POCSAGNetwork.h b/POCSAGNetwork.h index 693f5acf..9bbe47f8 100644 --- a/POCSAGNetwork.h +++ b/POCSAGNetwork.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef POCSAGNetwork_H -#define POCSAGNetwork_H +#pragma once #include "POCSAGDefines.h" #include "RingBuffer.h" @@ -52,5 +51,3 @@ class CPOCSAGNetwork { bool m_enabled; CRingBuffer m_buffer; }; - -#endif diff --git a/QR1676.h b/QR1676.h index dac2c0fe..ccbf7cad 100644 --- a/QR1676.h +++ b/QR1676.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef QR1676_H -#define QR1676_H +#pragma once class CQR1676 { public: @@ -28,5 +27,3 @@ class CQR1676 { private: static unsigned int getSyndrome1576(unsigned int pattern); }; - -#endif diff --git a/RS129.h b/RS129.h index 60f99bdb..c039ca85 100644 --- a/RS129.h +++ b/RS129.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(RS129_H) -#define RS129_H +#pragma once class CRS129 { @@ -26,5 +25,3 @@ class CRS129 static void encode(const unsigned char* msg, unsigned int nbytes, unsigned char* parity); }; - -#endif diff --git a/RSSIInterpolator.h b/RSSIInterpolator.h index ac1d4ad8..1d51bcd6 100644 --- a/RSSIInterpolator.h +++ b/RSSIInterpolator.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(RSSIINTERPOLATOR_H) -#define RSSIINTERPOLATOR_H +#pragma once #include #include @@ -35,5 +34,3 @@ class CRSSIInterpolator { private: std::map m_map; }; - -#endif diff --git a/RingBuffer.h b/RingBuffer.h index 707de1cc..2ab3e636 100644 --- a/RingBuffer.h +++ b/RingBuffer.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef RingBuffer_H -#define RingBuffer_H +#pragma once #include "Log.h" @@ -150,5 +149,3 @@ template class CRingBuffer { unsigned int m_iPtr; unsigned int m_oPtr; }; - -#endif diff --git a/SHA256.h b/SHA256.h index 7c48f19d..706c34e7 100644 --- a/SHA256.h +++ b/SHA256.h @@ -17,8 +17,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef SHA256_H -#define SHA256_H +#pragma once #include @@ -69,5 +68,3 @@ class CSHA256 { void init(); void conclude(); }; - -#endif diff --git a/SerialController.h b/SerialController.h index 7a7eed93..0fac1682 100644 --- a/SerialController.h +++ b/SerialController.h @@ -17,8 +17,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef SerialController_H -#define SerialController_H +#pragma once #include "SerialPort.h" @@ -60,5 +59,3 @@ class CSerialController : public ISerialPort { int m_fd; bool canWrite(); }; - -#endif diff --git a/SerialPort.h b/SerialPort.h index 2b633b67..0b51b625 100644 --- a/SerialPort.h +++ b/SerialPort.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef SerialPort_H -#define SerialPort_H +#pragma once class ISerialPort { public: @@ -33,5 +32,3 @@ class ISerialPort { private: }; - -#endif diff --git a/StopWatch.h b/StopWatch.h index 05b78d74..696f6ae0 100644 --- a/StopWatch.h +++ b/StopWatch.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(STOPWATCH_H) -#define STOPWATCH_H +#pragma once #include @@ -35,4 +34,3 @@ class CStopWatch private: unsigned long long m_startMS; }; -#endif diff --git a/Sync.h b/Sync.h index 20d3ea2a..42e8a02e 100644 --- a/Sync.h +++ b/Sync.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(SYNC_H) -#define SYNC_H +#pragma once class CSync { @@ -27,5 +26,3 @@ class CSync private: }; - -#endif diff --git a/TFTSerial.h b/TFTSerial.h index 181e769d..3a44a359 100644 --- a/TFTSerial.h +++ b/TFTSerial.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(TFTSERIAL_H) -#define TFTSERIAL_H +#pragma once #include "Display.h" #include "Defines.h" @@ -69,5 +68,3 @@ class CTFTSerial : public CDisplay void setBrightness(unsigned char brightness); void displayText(const char* text); }; - -#endif diff --git a/Timer.h b/Timer.h index 87d68f57..32ccae0b 100644 --- a/Timer.h +++ b/Timer.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef Timer_H -#define Timer_H +#pragma once class CTimer { public: @@ -85,5 +84,3 @@ class CTimer { unsigned int m_timeout; unsigned int m_timer; }; - -#endif diff --git a/UDPSocket.h b/UDPSocket.h index 91ed303f..c5420fe7 100644 --- a/UDPSocket.h +++ b/UDPSocket.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef UDPSocket_H -#define UDPSocket_H +#pragma once #include @@ -73,5 +72,3 @@ class CUDPSocket { int m_fd[UDP_SOCKET_MAX]; unsigned int m_counter; }; - -#endif diff --git a/UMP.h b/UMP.h index 1acc3c16..8e852317 100644 --- a/UMP.h +++ b/UMP.h @@ -16,8 +16,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if !defined(UMP_H) -#define UMP_H +#pragma once #include "SerialController.h" #include "SerialPort.h" @@ -59,5 +58,3 @@ class CUMP : public ISerialPort bool m_tx; bool m_cd; }; - -#endif diff --git a/Utils.h b/Utils.h index 96a2d2c9..d7a09d75 100644 --- a/Utils.h +++ b/Utils.h @@ -11,8 +11,7 @@ * GNU General Public License for more details. */ -#ifndef Utils_H -#define Utils_H +#pragma once #include @@ -34,5 +33,3 @@ class CUtils { private: }; - -#endif