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.
This commit is contained in:
Caio Marcelo de Oliveira Filho 2015-10-22 12:04:23 -02:00
parent 288dc2a385
commit 11b599bcd0
12 changed files with 12 additions and 49 deletions

View File

@ -17,8 +17,7 @@
parent class for aircraft simulators
*/
#ifndef _SIM_AIRCRAFT_H
#define _SIM_AIRCRAFT_H
#pragma once
#include <AP_Math/AP_Math.h>
@ -138,6 +137,3 @@ private:
};
} // namespace SITL
#endif // _SIM_AIRCRAFT_H

View File

@ -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

View File

@ -17,8 +17,7 @@
simulator connection for ardupilot version of CRRCSim
*/
#ifndef _SIM_CRRCSIM_H
#define _SIM_CRRCSIM_H
#pragma once
#include <AP_HAL/utility/Socket.h>
@ -79,5 +78,3 @@ private:
};
} // namespace SITL
#endif // _SIM_CRRCSIM_H

View File

@ -17,8 +17,7 @@
simulator connection for ardupilot version of Gazebo
*/
#ifndef _SIM_GAZEBO_H
#define _SIM_GAZEBO_H
#pragma once
#include <AP_HAL/utility/Socket.h>
@ -71,5 +70,3 @@ private:
};
} // namespace SITL
#endif // _SIM_GAZEBO_H

View File

@ -17,8 +17,7 @@
gimbal simulator class
*/
#ifndef _SIM_GIMBAL_H
#define _SIM_GIMBAL_H
#pragma once
#include <AP_HAL/utility/Socket.h>
@ -108,5 +107,3 @@ private:
};
} // namespace SITL
#endif // _SIM_GIMBAL_H

View File

@ -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

View File

@ -17,8 +17,7 @@
simulator connection for ardupilot version of JSBSim
*/
#ifndef _SIM_JSBSIM_H
#define _SIM_JSBSIM_H
#pragma once
#include <AP_HAL/utility/Socket.h>
@ -178,5 +177,3 @@ public:
};
} // namespace SITL
#endif // _SIM_JSBSIM_H

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 <AP_HAL/utility/Socket.h>
@ -77,5 +76,3 @@ private:
};
} // namespace SITL
#endif // _SIM_LAST_LETTER_H

View File

@ -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 <DataFlash/DataFlash.h>
#include <GCS_MAVLink/GCS_MAVLink.h>
@ -118,5 +117,3 @@ public:
};
} // namespace SITL
#endif // __SITL_H__