From 11b599bcd0fd0917fc11bce4d7068569152f3fc4 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Thu, 22 Oct 2015 12:04:23 -0200 Subject: [PATCH] SITL: use #pragma once For the general case, pragma once is better replacement for of include guards. One line instead of three, less scopes to close in the end of the file, no chance to having the outdated names in the define symbol. --- libraries/SITL/SIM_Aircraft.h | 6 +----- libraries/SITL/SIM_Balloon.h | 5 +---- libraries/SITL/SIM_CRRCSim.h | 5 +---- libraries/SITL/SIM_Gazebo.h | 5 +---- libraries/SITL/SIM_Gimbal.h | 5 +---- libraries/SITL/SIM_Helicopter.h | 5 +---- libraries/SITL/SIM_JSBSim.h | 5 +---- libraries/SITL/SIM_Multicopter.h | 5 +---- libraries/SITL/SIM_Rover.h | 5 +---- libraries/SITL/SIM_Tracker.h | 5 +---- libraries/SITL/SIM_last_letter.h | 5 +---- libraries/SITL/SITL.h | 5 +---- 12 files changed, 12 insertions(+), 49 deletions(-) diff --git a/libraries/SITL/SIM_Aircraft.h b/libraries/SITL/SIM_Aircraft.h index 1ab7eed190..5a1339bb3d 100644 --- a/libraries/SITL/SIM_Aircraft.h +++ b/libraries/SITL/SIM_Aircraft.h @@ -17,8 +17,7 @@ parent class for aircraft simulators */ -#ifndef _SIM_AIRCRAFT_H -#define _SIM_AIRCRAFT_H +#pragma once #include @@ -138,6 +137,3 @@ private: }; } // namespace SITL - -#endif // _SIM_AIRCRAFT_H - diff --git a/libraries/SITL/SIM_Balloon.h b/libraries/SITL/SIM_Balloon.h index 5045cc414d..ce99787bbf 100644 --- a/libraries/SITL/SIM_Balloon.h +++ b/libraries/SITL/SIM_Balloon.h @@ -17,8 +17,7 @@ balloon simulator class */ -#ifndef _SIM_BALLOON_H -#define _SIM_BALLOON_H +#pragma once #include "SIM_Aircraft.h" @@ -49,5 +48,3 @@ private: }; } // namespace SITL - -#endif // _SIM_BALLOON_H diff --git a/libraries/SITL/SIM_CRRCSim.h b/libraries/SITL/SIM_CRRCSim.h index d8cd20c4fe..d894e4359b 100644 --- a/libraries/SITL/SIM_CRRCSim.h +++ b/libraries/SITL/SIM_CRRCSim.h @@ -17,8 +17,7 @@ simulator connection for ardupilot version of CRRCSim */ -#ifndef _SIM_CRRCSIM_H -#define _SIM_CRRCSIM_H +#pragma once #include @@ -79,5 +78,3 @@ private: }; } // namespace SITL - -#endif // _SIM_CRRCSIM_H diff --git a/libraries/SITL/SIM_Gazebo.h b/libraries/SITL/SIM_Gazebo.h index 0336e238ae..a280523440 100644 --- a/libraries/SITL/SIM_Gazebo.h +++ b/libraries/SITL/SIM_Gazebo.h @@ -17,8 +17,7 @@ simulator connection for ardupilot version of Gazebo */ -#ifndef _SIM_GAZEBO_H -#define _SIM_GAZEBO_H +#pragma once #include @@ -71,5 +70,3 @@ private: }; } // namespace SITL - -#endif // _SIM_GAZEBO_H diff --git a/libraries/SITL/SIM_Gimbal.h b/libraries/SITL/SIM_Gimbal.h index a820f586de..c0cebc8cbe 100644 --- a/libraries/SITL/SIM_Gimbal.h +++ b/libraries/SITL/SIM_Gimbal.h @@ -17,8 +17,7 @@ gimbal simulator class */ -#ifndef _SIM_GIMBAL_H -#define _SIM_GIMBAL_H +#pragma once #include @@ -108,5 +107,3 @@ private: }; } // namespace SITL - -#endif // _SIM_GIMBAL_H diff --git a/libraries/SITL/SIM_Helicopter.h b/libraries/SITL/SIM_Helicopter.h index 3d3449930f..e23e577163 100644 --- a/libraries/SITL/SIM_Helicopter.h +++ b/libraries/SITL/SIM_Helicopter.h @@ -17,8 +17,7 @@ helicopter simulator class */ -#ifndef _SIM_HELICOPTER_H -#define _SIM_HELICOPTER_H +#pragma once #include "SIM_Aircraft.h" @@ -61,5 +60,3 @@ private: }; } // namespace SITL - -#endif // _SIM_HELICOPTER_H diff --git a/libraries/SITL/SIM_JSBSim.h b/libraries/SITL/SIM_JSBSim.h index 1ed14869ba..e369434dfc 100644 --- a/libraries/SITL/SIM_JSBSim.h +++ b/libraries/SITL/SIM_JSBSim.h @@ -17,8 +17,7 @@ simulator connection for ardupilot version of JSBSim */ -#ifndef _SIM_JSBSIM_H -#define _SIM_JSBSIM_H +#pragma once #include @@ -178,5 +177,3 @@ public: }; } // namespace SITL - -#endif // _SIM_JSBSIM_H diff --git a/libraries/SITL/SIM_Multicopter.h b/libraries/SITL/SIM_Multicopter.h index 35e2ebd26a..682a8c9872 100644 --- a/libraries/SITL/SIM_Multicopter.h +++ b/libraries/SITL/SIM_Multicopter.h @@ -17,8 +17,7 @@ multicopter simulator class */ -#ifndef _SIM_MULTICOPTER_H -#define _SIM_MULTICOPTER_H +#pragma once #include "SIM_Aircraft.h" @@ -82,5 +81,3 @@ private: }; } // namespace SITL - -#endif // _SIM_MULTICOPTER_H diff --git a/libraries/SITL/SIM_Rover.h b/libraries/SITL/SIM_Rover.h index f2b2a2d53d..bf5c1b8db2 100644 --- a/libraries/SITL/SIM_Rover.h +++ b/libraries/SITL/SIM_Rover.h @@ -17,8 +17,7 @@ rover simulator class */ -#ifndef _SIM_ROVER_H -#define _SIM_ROVER_H +#pragma once #include "SIM_Aircraft.h" @@ -55,5 +54,3 @@ private: }; } // namespace SITL - -#endif // _SIM_ROVER_H diff --git a/libraries/SITL/SIM_Tracker.h b/libraries/SITL/SIM_Tracker.h index c38bf96027..1922ba2e3d 100644 --- a/libraries/SITL/SIM_Tracker.h +++ b/libraries/SITL/SIM_Tracker.h @@ -17,8 +17,7 @@ antenna-tracker simulator class */ -#ifndef _SIM_TRACKER_H -#define _SIM_TRACKER_H +#pragma once #include "SIM_Aircraft.h" @@ -59,5 +58,3 @@ private: }; } // namespace SITL - -#endif diff --git a/libraries/SITL/SIM_last_letter.h b/libraries/SITL/SIM_last_letter.h index 32c248ae33..b8a9551d10 100644 --- a/libraries/SITL/SIM_last_letter.h +++ b/libraries/SITL/SIM_last_letter.h @@ -17,8 +17,7 @@ simulator connection for ardupilot version of last_letter */ -#ifndef _SIM_LAST_LETTER_H -#define _SIM_LAST_LETTER_H +#pragma once #include @@ -77,5 +76,3 @@ private: }; } // namespace SITL - -#endif // _SIM_LAST_LETTER_H diff --git a/libraries/SITL/SITL.h b/libraries/SITL/SITL.h index 8d0f2ac521..85e0925176 100644 --- a/libraries/SITL/SITL.h +++ b/libraries/SITL/SITL.h @@ -1,7 +1,6 @@ /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- -#ifndef __SITL_H__ -#define __SITL_H__ +#pragma once #include #include @@ -118,5 +117,3 @@ public: }; } // namespace SITL - -#endif // __SITL_H__