Browse Source

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.
master
Caio Marcelo de Oliveira Filho 9 years ago
parent
commit
11b599bcd0
  1. 6
      libraries/SITL/SIM_Aircraft.h
  2. 5
      libraries/SITL/SIM_Balloon.h
  3. 5
      libraries/SITL/SIM_CRRCSim.h
  4. 5
      libraries/SITL/SIM_Gazebo.h
  5. 5
      libraries/SITL/SIM_Gimbal.h
  6. 5
      libraries/SITL/SIM_Helicopter.h
  7. 5
      libraries/SITL/SIM_JSBSim.h
  8. 5
      libraries/SITL/SIM_Multicopter.h
  9. 5
      libraries/SITL/SIM_Rover.h
  10. 5
      libraries/SITL/SIM_Tracker.h
  11. 5
      libraries/SITL/SIM_last_letter.h
  12. 5
      libraries/SITL/SITL.h

6
libraries/SITL/SIM_Aircraft.h

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

5
libraries/SITL/SIM_Balloon.h

@ -17,8 +17,7 @@
balloon simulator class balloon simulator class
*/ */
#ifndef _SIM_BALLOON_H #pragma once
#define _SIM_BALLOON_H
#include "SIM_Aircraft.h" #include "SIM_Aircraft.h"
@ -49,5 +48,3 @@ private:
}; };
} // namespace SITL } // namespace SITL
#endif // _SIM_BALLOON_H

5
libraries/SITL/SIM_CRRCSim.h

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

5
libraries/SITL/SIM_Gazebo.h

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

5
libraries/SITL/SIM_Gimbal.h

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

5
libraries/SITL/SIM_Helicopter.h

@ -17,8 +17,7 @@
helicopter simulator class helicopter simulator class
*/ */
#ifndef _SIM_HELICOPTER_H #pragma once
#define _SIM_HELICOPTER_H
#include "SIM_Aircraft.h" #include "SIM_Aircraft.h"
@ -61,5 +60,3 @@ private:
}; };
} // namespace SITL } // namespace SITL
#endif // _SIM_HELICOPTER_H

5
libraries/SITL/SIM_JSBSim.h

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

5
libraries/SITL/SIM_Multicopter.h

@ -17,8 +17,7 @@
multicopter simulator class multicopter simulator class
*/ */
#ifndef _SIM_MULTICOPTER_H #pragma once
#define _SIM_MULTICOPTER_H
#include "SIM_Aircraft.h" #include "SIM_Aircraft.h"
@ -82,5 +81,3 @@ private:
}; };
} // namespace SITL } // namespace SITL
#endif // _SIM_MULTICOPTER_H

5
libraries/SITL/SIM_Rover.h

@ -17,8 +17,7 @@
rover simulator class rover simulator class
*/ */
#ifndef _SIM_ROVER_H #pragma once
#define _SIM_ROVER_H
#include "SIM_Aircraft.h" #include "SIM_Aircraft.h"
@ -55,5 +54,3 @@ private:
}; };
} // namespace SITL } // namespace SITL
#endif // _SIM_ROVER_H

5
libraries/SITL/SIM_Tracker.h

@ -17,8 +17,7 @@
antenna-tracker simulator class antenna-tracker simulator class
*/ */
#ifndef _SIM_TRACKER_H #pragma once
#define _SIM_TRACKER_H
#include "SIM_Aircraft.h" #include "SIM_Aircraft.h"
@ -59,5 +58,3 @@ private:
}; };
} // namespace SITL } // namespace SITL
#endif

5
libraries/SITL/SIM_last_letter.h

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

5
libraries/SITL/SITL.h

@ -1,7 +1,6 @@
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- /// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#ifndef __SITL_H__ #pragma once
#define __SITL_H__
#include <DataFlash/DataFlash.h> #include <DataFlash/DataFlash.h>
#include <GCS_MAVLink/GCS_MAVLink.h> #include <GCS_MAVLink/GCS_MAVLink.h>
@ -118,5 +117,3 @@ public:
}; };
} // namespace SITL } // namespace SITL
#endif // __SITL_H__

Loading…
Cancel
Save