From 2bed317c6c98db70dc0b78832b11b0277f749311 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 17 Feb 2016 23:25:23 -0200 Subject: [PATCH] AP_HAL_Empty: replace header guard with pragma once --- libraries/AP_HAL_Empty/AP_HAL_Empty.h | 7 +------ libraries/AP_HAL_Empty/AP_HAL_Empty_Private.h | 7 +------ libraries/AP_HAL_Empty/AnalogIn.h | 5 +---- libraries/AP_HAL_Empty/GPIO.h | 6 +----- libraries/AP_HAL_Empty/I2CDriver.h | 6 +----- libraries/AP_HAL_Empty/PrivateMember.h | 7 +------ libraries/AP_HAL_Empty/RCInput.h | 6 +----- libraries/AP_HAL_Empty/RCOutput.h | 6 +----- libraries/AP_HAL_Empty/Scheduler.h | 6 +----- libraries/AP_HAL_Empty/Semaphores.h | 6 +----- libraries/AP_HAL_Empty/Storage.h | 6 +----- libraries/AP_HAL_Empty/UARTDriver.h | 6 +----- libraries/AP_HAL_Empty/Util.h | 6 +----- 13 files changed, 13 insertions(+), 67 deletions(-) diff --git a/libraries/AP_HAL_Empty/AP_HAL_Empty.h b/libraries/AP_HAL_Empty/AP_HAL_Empty.h index 47600053d5..dee902bac3 100644 --- a/libraries/AP_HAL_Empty/AP_HAL_Empty.h +++ b/libraries/AP_HAL_Empty/AP_HAL_Empty.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_H__ -#define __AP_HAL_EMPTY_H__ +#pragma once /* Your layer exports should depend on AP_HAL.h ONLY. */ #include @@ -21,6 +19,3 @@ */ #include "HAL_Empty_Class.h" - -#endif //__AP_HAL_EMPTY_H__ - diff --git a/libraries/AP_HAL_Empty/AP_HAL_Empty_Private.h b/libraries/AP_HAL_Empty/AP_HAL_Empty_Private.h index 90eaa84b58..932b211cba 100644 --- a/libraries/AP_HAL_Empty/AP_HAL_Empty_Private.h +++ b/libraries/AP_HAL_Empty/AP_HAL_Empty_Private.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_PRIVATE_H__ -#define __AP_HAL_EMPTY_PRIVATE_H__ +#pragma once /* Umbrella header for all private headers of the AP_HAL_Empty module. * Only import this header from inside AP_HAL_Empty @@ -20,6 +18,3 @@ #include "Storage.h" #include "UARTDriver.h" #include "Util.h" - -#endif // __AP_HAL_EMPTY_PRIVATE_H__ - diff --git a/libraries/AP_HAL_Empty/AnalogIn.h b/libraries/AP_HAL_Empty/AnalogIn.h index 160145a306..24d33c03eb 100644 --- a/libraries/AP_HAL_Empty/AnalogIn.h +++ b/libraries/AP_HAL_Empty/AnalogIn.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_ANALOGIN_H__ -#define __AP_HAL_EMPTY_ANALOGIN_H__ +#pragma once #include "AP_HAL_Empty.h" @@ -26,4 +24,3 @@ public: AP_HAL::AnalogSource* channel(int16_t n); float board_voltage(void); }; -#endif // __AP_HAL_EMPTY_ANALOGIN_H__ diff --git a/libraries/AP_HAL_Empty/GPIO.h b/libraries/AP_HAL_Empty/GPIO.h index a74841c98b..740220d749 100644 --- a/libraries/AP_HAL_Empty/GPIO.h +++ b/libraries/AP_HAL_Empty/GPIO.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_GPIO_H__ -#define __AP_HAL_EMPTY_GPIO_H__ +#pragma once #include "AP_HAL_Empty.h" @@ -35,5 +33,3 @@ public: private: uint8_t _v; }; - -#endif // __AP_HAL_EMPTY_GPIO_H__ diff --git a/libraries/AP_HAL_Empty/I2CDriver.h b/libraries/AP_HAL_Empty/I2CDriver.h index c4a4b2b259..044c82f720 100644 --- a/libraries/AP_HAL_Empty/I2CDriver.h +++ b/libraries/AP_HAL_Empty/I2CDriver.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_I2CDRIVER_H__ -#define __AP_HAL_EMPTY_I2CDRIVER_H__ +#pragma once #include "AP_HAL_Empty.h" @@ -49,5 +47,3 @@ public: private: AP_HAL::Semaphore* _semaphore; }; - -#endif // __AP_HAL_EMPTY_I2CDRIVER_H__ diff --git a/libraries/AP_HAL_Empty/PrivateMember.h b/libraries/AP_HAL_Empty/PrivateMember.h index f073f92355..f445c6f8fe 100644 --- a/libraries/AP_HAL_Empty/PrivateMember.h +++ b/libraries/AP_HAL_Empty/PrivateMember.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_PRIVATE_MEMBER_H__ -#define __AP_HAL_EMPTY_PRIVATE_MEMBER_H__ +#pragma once /* Just a stub as an example of how to implement a private member of an * AP_HAL module */ @@ -14,6 +12,3 @@ public: private: uint16_t _foo; }; - -#endif // __AP_HAL_EMPTY_PRIVATE_MEMBER_H__ - diff --git a/libraries/AP_HAL_Empty/RCInput.h b/libraries/AP_HAL_Empty/RCInput.h index a24bba7677..3bcabd50b0 100644 --- a/libraries/AP_HAL_Empty/RCInput.h +++ b/libraries/AP_HAL_Empty/RCInput.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_RCINPUT_H__ -#define __AP_HAL_EMPTY_RCINPUT_H__ +#pragma once #include "AP_HAL_Empty.h" @@ -17,5 +15,3 @@ public: bool set_override(uint8_t channel, int16_t override); void clear_overrides(); }; - -#endif // __AP_HAL_EMPTY_RCINPUT_H__ diff --git a/libraries/AP_HAL_Empty/RCOutput.h b/libraries/AP_HAL_Empty/RCOutput.h index c831394672..77ad04cb38 100644 --- a/libraries/AP_HAL_Empty/RCOutput.h +++ b/libraries/AP_HAL_Empty/RCOutput.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_RCOUTPUT_H__ -#define __AP_HAL_EMPTY_RCOUTPUT_H__ +#pragma once #include "AP_HAL_Empty.h" @@ -14,5 +12,3 @@ class Empty::RCOutput : public AP_HAL::RCOutput { uint16_t read(uint8_t ch); void read(uint16_t* period_us, uint8_t len); }; - -#endif // __AP_HAL_EMPTY_RCOUTPUT_H__ diff --git a/libraries/AP_HAL_Empty/Scheduler.h b/libraries/AP_HAL_Empty/Scheduler.h index 8bd163f502..3a97dffe3e 100644 --- a/libraries/AP_HAL_Empty/Scheduler.h +++ b/libraries/AP_HAL_Empty/Scheduler.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_SCHEDULER_H__ -#define __AP_HAL_EMPTY_SCHEDULER_H__ +#pragma once #include "AP_HAL_Empty.h" @@ -27,5 +25,3 @@ public: void reboot(bool hold_in_bootloader); }; - -#endif // __AP_HAL_EMPTY_SCHEDULER_H__ diff --git a/libraries/AP_HAL_Empty/Semaphores.h b/libraries/AP_HAL_Empty/Semaphores.h index 38279db9be..cb89c197bd 100644 --- a/libraries/AP_HAL_Empty/Semaphores.h +++ b/libraries/AP_HAL_Empty/Semaphores.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_SEMAPHORE_H__ -#define __AP_HAL_EMPTY_SEMAPHORE_H__ +#pragma once #include "AP_HAL_Empty.h" @@ -13,5 +11,3 @@ public: private: bool _taken; }; - -#endif // __AP_HAL_EMPTY_SEMAPHORE_H__ diff --git a/libraries/AP_HAL_Empty/Storage.h b/libraries/AP_HAL_Empty/Storage.h index 3eb66063d3..dd01cbea5a 100644 --- a/libraries/AP_HAL_Empty/Storage.h +++ b/libraries/AP_HAL_Empty/Storage.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_STORAGE_H__ -#define __AP_HAL_EMPTY_STORAGE_H__ +#pragma once #include "AP_HAL_Empty.h" @@ -11,5 +9,3 @@ public: void read_block(void *dst, uint16_t src, size_t n); void write_block(uint16_t dst, const void* src, size_t n); }; - -#endif // __AP_HAL_EMPTY_STORAGE_H__ diff --git a/libraries/AP_HAL_Empty/UARTDriver.h b/libraries/AP_HAL_Empty/UARTDriver.h index 11cadf5d45..22d5a7a04f 100644 --- a/libraries/AP_HAL_Empty/UARTDriver.h +++ b/libraries/AP_HAL_Empty/UARTDriver.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_UARTDRIVER_H__ -#define __AP_HAL_EMPTY_UARTDRIVER_H__ +#pragma once #include "AP_HAL_Empty.h" @@ -25,5 +23,3 @@ public: size_t write(uint8_t c); size_t write(const uint8_t *buffer, size_t size); }; - -#endif // __AP_HAL_EMPTY_UARTDRIVER_H__ diff --git a/libraries/AP_HAL_Empty/Util.h b/libraries/AP_HAL_Empty/Util.h index 369af241bb..f461d2c482 100644 --- a/libraries/AP_HAL_Empty/Util.h +++ b/libraries/AP_HAL_Empty/Util.h @@ -1,6 +1,4 @@ - -#ifndef __AP_HAL_EMPTY_UTIL_H__ -#define __AP_HAL_EMPTY_UTIL_H__ +#pragma once #include #include "AP_HAL_Empty_Namespace.h" @@ -9,5 +7,3 @@ class Empty::Util : public AP_HAL::Util { public: bool run_debug_shell(AP_HAL::BetterStream *stream) { return false; } }; - -#endif // __AP_HAL_EMPTY_UTIL_H__