From dd8014dd2fee9f72fc3fa4caa4a004f615f06936 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 17 Feb 2016 23:25:59 -0200 Subject: [PATCH] APMrover2: replace header guard with pragma once --- APMrover2/Parameters.h | 7 +------ APMrover2/Rover.h | 6 +----- APMrover2/compat.h | 7 +------ APMrover2/config.h | 1 + APMrover2/defines.h | 6 +----- 5 files changed, 5 insertions(+), 22 deletions(-) diff --git a/APMrover2/Parameters.h b/APMrover2/Parameters.h index e87120e1fa..e184a9e490 100644 --- a/APMrover2/Parameters.h +++ b/APMrover2/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 @@ -322,6 +320,3 @@ public: }; extern const AP_Param::Info var_info[]; - -#endif // PARAMETERS_H - diff --git a/APMrover2/Rover.h b/APMrover2/Rover.h index 1a621cbf8f..5ef0c91ae9 100644 --- a/APMrover2/Rover.h +++ b/APMrover2/Rover.h @@ -16,9 +16,7 @@ /* main Rover class, containing all vehicle specific state */ - -#ifndef _ROVER_H_ -#define _ROVER_H_ +#pragma once #define THISFIRMWARE "ArduRover v2.51-beta" #define FIRMWARE_VERSION 2,51,0,FIRMWARE_VERSION_TYPE_BETA @@ -564,5 +562,3 @@ extern Rover rover; using AP_HAL::millis; using AP_HAL::micros; - -#endif // _ROVER_H_ diff --git a/APMrover2/compat.h b/APMrover2/compat.h index 37ba4b7d8f..aba50b3131 100644 --- a/APMrover2/compat.h +++ b/APMrover2/compat.h @@ -1,9 +1,4 @@ - -#ifndef __COMPAT_H__ -#define __COMPAT_H__ +#pragma once #define HIGH 1 #define LOW 0 - -#endif // __COMPAT_H__ - diff --git a/APMrover2/config.h b/APMrover2/config.h index c7b915d5cf..4c45ba8598 100644 --- a/APMrover2/config.h +++ b/APMrover2/config.h @@ -19,6 +19,7 @@ // // - Try to keep this file organised in the same order as APM_Config.h.example // +#pragma once #include "defines.h" diff --git a/APMrover2/defines.h b/APMrover2/defines.h index ac91574c8a..71d7ed5bd5 100644 --- a/APMrover2/defines.h +++ b/APMrover2/defines.h @@ -1,7 +1,5 @@ // -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- - -#ifndef _DEFINES_H -#define _DEFINES_H +#pragma once // Internal defines, don't edit and expect things to work // ------------------------------------------------------- @@ -126,5 +124,3 @@ enum mode { // convert a boolean (0 or 1) to a sign for multiplying (0 maps to 1, 1 maps to -1) #define BOOL_TO_SIGN(bvalue) ((bvalue)?-1:1) - -#endif // _DEFINES_H