From 36336e17b3fb46930200467d654bc187dec97178 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 17 Feb 2016 23:26:01 -0200 Subject: [PATCH] Tools: replace header guard with pragma once --- Tools/ArduPPM/Libraries/PPM_Encoder.h | 7 +------ Tools/ArduPPM/Libraries/PPM_Encoder_v3.h | 7 +------ Tools/Linux_HAL_Essentials/pru/pwmpru/linux_types.h | 6 +----- Tools/Linux_HAL_Essentials/pru/pwmpru/pru_defs.h | 5 +---- Tools/Linux_HAL_Essentials/pru/pwmpru/prucomm.h | 5 +---- Tools/Linux_HAL_Essentials/pru/rcinpru/linux_types.h | 6 +----- Tools/Linux_HAL_Essentials/pru/rcinpru/pru_defs.h | 5 +---- Tools/Linux_HAL_Essentials/pru/rcinpru/prucomm.h | 5 +---- Tools/Replay/DataFlashFileReader.h | 5 +---- Tools/Replay/LR_MsgHandler.h | 6 +----- Tools/Replay/MsgHandler.h | 5 +---- Tools/Replay/Parameters.h | 6 +----- Tools/Replay/VehicleType.h | 5 +---- 13 files changed, 13 insertions(+), 60 deletions(-) diff --git a/Tools/ArduPPM/Libraries/PPM_Encoder.h b/Tools/ArduPPM/Libraries/PPM_Encoder.h index 154ae72b38..46e0b44b5b 100644 --- a/Tools/ArduPPM/Libraries/PPM_Encoder.h +++ b/Tools/ArduPPM/Libraries/PPM_Encoder.h @@ -147,9 +147,7 @@ // - ppm_encoder_init() will now make sure PPM output always starts with fail-safe (900us) value on throttle after a brown-out reset // ------------------------------------------------------------- - -#ifndef _PPM_ENCODER_H_ -#define _PPM_ENCODER_H_ +#pragma once #include @@ -1055,6 +1053,3 @@ void ppm_encoder_init( void ) } } // ------------------------------------------------------------------------------ - -#endif // _PPM_ENCODER_H_ - diff --git a/Tools/ArduPPM/Libraries/PPM_Encoder_v3.h b/Tools/ArduPPM/Libraries/PPM_Encoder_v3.h index c5e15460f5..7efd0d7a20 100644 --- a/Tools/ArduPPM/Libraries/PPM_Encoder_v3.h +++ b/Tools/ArduPPM/Libraries/PPM_Encoder_v3.h @@ -14,9 +14,7 @@ // ------------------------------------------------------------- // Not for production - Work in progress - -#ifndef _PPM_ENCODER_H_ -#define _PPM_ENCODER_H_ +#pragma once #include #include @@ -1474,6 +1472,3 @@ void ppm_encoder_init( void ) } // ------------------------------------------------------------------------------ - -#endif // _PPM_ENCODER_H_ - diff --git a/Tools/Linux_HAL_Essentials/pru/pwmpru/linux_types.h b/Tools/Linux_HAL_Essentials/pru/pwmpru/linux_types.h index 8ec74c43e4..c1a6259787 100644 --- a/Tools/Linux_HAL_Essentials/pru/pwmpru/linux_types.h +++ b/Tools/Linux_HAL_Essentials/pru/pwmpru/linux_types.h @@ -1,5 +1,4 @@ -#ifndef LINUX_TYPES_H -#define LINUX_TYPES_H +#pragma once #include @@ -14,6 +13,3 @@ typedef uint32_t u32; typedef uint64_t u64; #define __packed __attribute__((packed)) - - -#endif diff --git a/Tools/Linux_HAL_Essentials/pru/pwmpru/pru_defs.h b/Tools/Linux_HAL_Essentials/pru/pwmpru/pru_defs.h index 5fb9689d5d..fc8da8295b 100644 --- a/Tools/Linux_HAL_Essentials/pru/pwmpru/pru_defs.h +++ b/Tools/Linux_HAL_Essentials/pru/pwmpru/pru_defs.h @@ -1,5 +1,4 @@ -#ifndef PRU_DEFS_H -#define PRU_DEFS_H +#pragma once volatile register unsigned int __R31; volatile register unsigned int __R30; @@ -645,5 +644,3 @@ static inline void pru_other_and_or_reg(u16 reg, u32 andmsk, u32 ormsk) } #endif - -#endif diff --git a/Tools/Linux_HAL_Essentials/pru/pwmpru/prucomm.h b/Tools/Linux_HAL_Essentials/pru/pwmpru/prucomm.h index 3d03eb41ab..5042d7b0f8 100644 --- a/Tools/Linux_HAL_Essentials/pru/pwmpru/prucomm.h +++ b/Tools/Linux_HAL_Essentials/pru/pwmpru/prucomm.h @@ -2,8 +2,7 @@ * prucomm.h - structure definitions for communication * */ -#ifndef PRUCOMM_H -#define PRUCOMM_H +#pragma once #include "pru_defs.h" @@ -71,5 +70,3 @@ struct cxt { /* the command is at the start of shared DPRAM */ #define PWM_CMD ((volatile struct pwm_cmd *)DPRAM_SHARED) - -#endif diff --git a/Tools/Linux_HAL_Essentials/pru/rcinpru/linux_types.h b/Tools/Linux_HAL_Essentials/pru/rcinpru/linux_types.h index 8ec74c43e4..c1a6259787 100644 --- a/Tools/Linux_HAL_Essentials/pru/rcinpru/linux_types.h +++ b/Tools/Linux_HAL_Essentials/pru/rcinpru/linux_types.h @@ -1,5 +1,4 @@ -#ifndef LINUX_TYPES_H -#define LINUX_TYPES_H +#pragma once #include @@ -14,6 +13,3 @@ typedef uint32_t u32; typedef uint64_t u64; #define __packed __attribute__((packed)) - - -#endif diff --git a/Tools/Linux_HAL_Essentials/pru/rcinpru/pru_defs.h b/Tools/Linux_HAL_Essentials/pru/rcinpru/pru_defs.h index 343d80b4ab..0110e297e0 100644 --- a/Tools/Linux_HAL_Essentials/pru/rcinpru/pru_defs.h +++ b/Tools/Linux_HAL_Essentials/pru/rcinpru/pru_defs.h @@ -1,5 +1,4 @@ -#ifndef PRU_DEFS_H -#define PRU_DEFS_H +#pragma once volatile register unsigned int __R31; volatile register unsigned int __R30; @@ -645,5 +644,3 @@ static inline void pru_other_and_or_reg(u16 reg, u32 andmsk, u32 ormsk) } #endif - -#endif diff --git a/Tools/Linux_HAL_Essentials/pru/rcinpru/prucomm.h b/Tools/Linux_HAL_Essentials/pru/rcinpru/prucomm.h index 8e13d40b5f..8396c16622 100644 --- a/Tools/Linux_HAL_Essentials/pru/rcinpru/prucomm.h +++ b/Tools/Linux_HAL_Essentials/pru/rcinpru/prucomm.h @@ -2,8 +2,7 @@ * prucomm.h - structure definitions for communication * */ -#ifndef PRUCOMM_H -#define PRUCOMM_H +#pragma once #include "pru_defs.h" @@ -23,5 +22,3 @@ struct ring_buffer { /* the command is at the start of shared DPRAM */ #define RBUFF ((volatile struct ring_buffer *)DPRAM_SHARED) - -#endif diff --git a/Tools/Replay/DataFlashFileReader.h b/Tools/Replay/DataFlashFileReader.h index ef461fd832..80c309c7a5 100644 --- a/Tools/Replay/DataFlashFileReader.h +++ b/Tools/Replay/DataFlashFileReader.h @@ -1,5 +1,4 @@ -#ifndef REPLAY_DATAFLASHREADER_H -#define REPLAY_DATAFLASHREADER_H +#pragma once #include @@ -20,5 +19,3 @@ protected: #define LOGREADER_MAX_FORMATS 255 // must be >= highest MESSAGE struct log_Format formats[LOGREADER_MAX_FORMATS] {}; }; - -#endif diff --git a/Tools/Replay/LR_MsgHandler.h b/Tools/Replay/LR_MsgHandler.h index 1b26afd25f..c57cc1b6d1 100644 --- a/Tools/Replay/LR_MsgHandler.h +++ b/Tools/Replay/LR_MsgHandler.h @@ -1,5 +1,4 @@ -#ifndef AP_LR_MSGHANDLER_H -#define AP_LR_MSGHANDLER_H +#pragma once #include "MsgHandler.h" @@ -414,6 +413,3 @@ public: private: Vector3f &sim_attitude; }; - - -#endif diff --git a/Tools/Replay/MsgHandler.h b/Tools/Replay/MsgHandler.h index c026fe5cbb..9bad348671 100644 --- a/Tools/Replay/MsgHandler.h +++ b/Tools/Replay/MsgHandler.h @@ -1,5 +1,4 @@ -#ifndef AP_MSGHANDLER_H -#define AP_MSGHANDLER_H +#pragma once #include #include "VehicleType.h" @@ -152,5 +151,3 @@ inline void MsgHandler::field_value_for_type_at_offset(uint8_t *msg, exit(1); } } - -#endif diff --git a/Tools/Replay/Parameters.h b/Tools/Replay/Parameters.h index 15ca8cc1c6..e1e259f8be 100644 --- a/Tools/Replay/Parameters.h +++ b/Tools/Replay/Parameters.h @@ -1,7 +1,5 @@ // -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- - -#ifndef PARAMETERS_H -#define PARAMETERS_H +#pragma once #include @@ -23,5 +21,3 @@ public: }; extern const AP_Param::Info var_info[]; - -#endif // PARAMETERS_H diff --git a/Tools/Replay/VehicleType.h b/Tools/Replay/VehicleType.h index a9d567c40b..4fc5c122cd 100644 --- a/Tools/Replay/VehicleType.h +++ b/Tools/Replay/VehicleType.h @@ -1,5 +1,4 @@ -#ifndef AP_VEHICLETYPE_H -#define AP_VEHICLETYPE_H +#pragma once class VehicleType { public: @@ -10,5 +9,3 @@ public: VEHICLE_ROVER }; }; - -#endif