From 758845451665ce1041890c187d49756a02e02d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Sat, 27 Oct 2018 11:44:53 -0300 Subject: [PATCH] comm: Move to pragma once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/comm/BluetoothLink.h | 6 ++---- src/comm/CallConv.h | 5 +---- src/comm/LinkConfiguration.h | 6 ++---- src/comm/LinkInterface.h | 6 ++---- src/comm/LinkManager.h | 6 ++---- src/comm/LogReplayLink.h | 6 ++---- src/comm/MAVLinkProtocol.h | 6 ++---- src/comm/MavlinkMessagesTimer.h | 4 +--- src/comm/MockLink.h | 6 ++---- src/comm/MockLinkFileServer.h | 6 ++---- src/comm/MockLinkMissionItemHandler.h | 6 ++---- src/comm/QGCFlightGearLink.h | 6 ++---- src/comm/QGCHilLink.h | 4 +--- src/comm/QGCJSBSimLink.h | 6 ++---- src/comm/QGCMAVLink.h | 6 ++---- src/comm/QGCSerialPortInfo.h | 6 ++---- src/comm/QGCXPlaneLink.h | 6 ++---- src/comm/SerialInterface.h | 6 ++---- src/comm/SerialLink.h | 6 ++---- src/comm/TCPLink.h | 6 ++---- src/comm/UDPLink.h | 6 ++---- 21 files changed, 39 insertions(+), 82 deletions(-) diff --git a/src/comm/BluetoothLink.h b/src/comm/BluetoothLink.h index b3407a3fd7..6503afee1e 100644 --- a/src/comm/BluetoothLink.h +++ b/src/comm/BluetoothLink.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -15,8 +15,7 @@ * */ -#ifndef BTLINK_H -#define BTLINK_H +#pragma once #include #include @@ -194,4 +193,3 @@ private: }; -#endif // BTLINK_H diff --git a/src/comm/CallConv.h b/src/comm/CallConv.h index 6c13955cf4..52f292895e 100644 --- a/src/comm/CallConv.h +++ b/src/comm/CallConv.h @@ -1,11 +1,8 @@ -#ifndef _CALLCONV_H_ -#define _CALLCONV_H_ +#pragma once #ifdef Q_OS_WIN #define CALLTYPEXBEE __stdcall #else // Q_OS_WIN #define CALLTYPEXBEE -#endif // Q_OS_WIN -#endif // _CALLCONV_H_ \ No newline at end of file diff --git a/src/comm/LinkConfiguration.h b/src/comm/LinkConfiguration.h index e4027313b4..68227be0da 100644 --- a/src/comm/LinkConfiguration.h +++ b/src/comm/LinkConfiguration.h @@ -1,14 +1,13 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. * ****************************************************************************/ -#ifndef LINKCONFIGURATION_H -#define LINKCONFIGURATION_H +#pragma once #include @@ -208,4 +207,3 @@ private: typedef QSharedPointer SharedLinkConfigurationPointer; -#endif // LINKCONFIGURATION_H diff --git a/src/comm/LinkInterface.h b/src/comm/LinkInterface.h index 58b8a27d55..36c01fb72f 100644 --- a/src/comm/LinkInterface.h +++ b/src/comm/LinkInterface.h @@ -1,14 +1,13 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. * ****************************************************************************/ -#ifndef _LINKINTERFACE_H_ -#define _LINKINTERFACE_H_ +#pragma once #include #include @@ -308,4 +307,3 @@ private: typedef QSharedPointer SharedLinkInterfacePointer; -#endif // _LINKINTERFACE_H_ diff --git a/src/comm/LinkManager.h b/src/comm/LinkManager.h index 83474b6ba9..7aeb62e9b8 100644 --- a/src/comm/LinkManager.h +++ b/src/comm/LinkManager.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -11,8 +11,7 @@ /// @file /// @author Lorenz Meier -#ifndef _LINKMANAGER_H_ -#define _LINKMANAGER_H_ +#pragma once #include #include @@ -244,4 +243,3 @@ private: #endif }; -#endif diff --git a/src/comm/LogReplayLink.h b/src/comm/LogReplayLink.h index 1ae85d5c9e..c28f55b66a 100644 --- a/src/comm/LogReplayLink.h +++ b/src/comm/LogReplayLink.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -8,8 +8,7 @@ ****************************************************************************/ -#ifndef LogReplayLink_H -#define LogReplayLink_H +#pragma once #include "LinkInterface.h" #include "LinkConfiguration.h" @@ -155,4 +154,3 @@ private: static const int cbTimestamp = sizeof(quint64); }; -#endif diff --git a/src/comm/MAVLinkProtocol.h b/src/comm/MAVLinkProtocol.h index cd2a305685..b2ec5589b0 100644 --- a/src/comm/MAVLinkProtocol.h +++ b/src/comm/MAVLinkProtocol.h @@ -1,14 +1,13 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. * ****************************************************************************/ -#ifndef MAVLINKPROTOCOL_H_ -#define MAVLINKPROTOCOL_H_ +#pragma once #include #include @@ -171,4 +170,3 @@ private: MultiVehicleManager* _multiVehicleManager; }; -#endif // MAVLINKPROTOCOL_H_ diff --git a/src/comm/MavlinkMessagesTimer.h b/src/comm/MavlinkMessagesTimer.h index 0e4010d3b4..850e2f7d12 100644 --- a/src/comm/MavlinkMessagesTimer.h +++ b/src/comm/MavlinkMessagesTimer.h @@ -7,8 +7,7 @@ * ****************************************************************************/ -#ifndef _MAVLINKMESSAGESTIMER_H_ -#define _MAVLINKMESSAGESTIMER_H_ +#pragma once #include #include @@ -103,4 +102,3 @@ private: static const int _messageReceivedTimeoutMSecs = 3500; // Signal connection lost after 3.5 seconds of no messages }; -#endif // _MAVLINKMESSAGESTIMER_H_ diff --git a/src/comm/MockLink.h b/src/comm/MockLink.h index 105839a0d2..4c6de83084 100644 --- a/src/comm/MockLink.h +++ b/src/comm/MockLink.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -8,8 +8,7 @@ ****************************************************************************/ -#ifndef MOCKLINK_H -#define MOCKLINK_H +#pragma once #include #include @@ -259,4 +258,3 @@ private: static const char* _failParam; }; -#endif diff --git a/src/comm/MockLinkFileServer.h b/src/comm/MockLinkFileServer.h index 81e77e6618..7b3084e279 100644 --- a/src/comm/MockLinkFileServer.h +++ b/src/comm/MockLinkFileServer.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -11,8 +11,7 @@ /// @file /// @author Don Gagne -#ifndef MockLinkFileServer_H -#define MockLinkFileServer_H +#pragma once #include "FileManager.h" @@ -110,4 +109,3 @@ private: bool _randomDropsEnabled; }; -#endif diff --git a/src/comm/MockLinkMissionItemHandler.h b/src/comm/MockLinkMissionItemHandler.h index bc40a68dab..b25f22e014 100644 --- a/src/comm/MockLinkMissionItemHandler.h +++ b/src/comm/MockLinkMissionItemHandler.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -8,8 +8,7 @@ ****************************************************************************/ -#ifndef MockLinkMissionItemHandler_H -#define MockLinkMissionItemHandler_H +#pragma once #include #include @@ -115,4 +114,3 @@ private: bool _failWriteMissionCountFirstResponse; }; -#endif diff --git a/src/comm/QGCFlightGearLink.h b/src/comm/QGCFlightGearLink.h index 6545119575..e9c94aa1bd 100644 --- a/src/comm/QGCFlightGearLink.h +++ b/src/comm/QGCFlightGearLink.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -15,8 +15,7 @@ * */ -#ifndef QGCFLIGHTGEARLINK_H -#define QGCFLIGHTGEARLINK_H +#pragma once #include #include @@ -160,4 +159,3 @@ private: float barometerOffsetkPa; }; -#endif // QGCFLIGHTGEARLINK_H diff --git a/src/comm/QGCHilLink.h b/src/comm/QGCHilLink.h index 9ac69813a5..3d1ead78b3 100644 --- a/src/comm/QGCHilLink.h +++ b/src/comm/QGCHilLink.h @@ -1,5 +1,4 @@ -#ifndef QGCHILLINK_H -#define QGCHILLINK_H +#pragma once #include #include @@ -148,4 +147,3 @@ signals: void _invokeWriteBytes(QByteArray); }; -#endif // QGCHILLINK_H diff --git a/src/comm/QGCJSBSimLink.h b/src/comm/QGCJSBSimLink.h index 0cf65f8079..336eb97930 100644 --- a/src/comm/QGCJSBSimLink.h +++ b/src/comm/QGCJSBSimLink.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -15,8 +15,7 @@ * */ -#ifndef QGCJSBSIMLINK_H -#define QGCJSBSIMLINK_H +#pragma once #include #include @@ -147,4 +146,3 @@ private: void setName(QString name); }; -#endif // QGCJSBSimLink_H diff --git a/src/comm/QGCMAVLink.h b/src/comm/QGCMAVLink.h index 5b656c2218..6c3ed82f58 100644 --- a/src/comm/QGCMAVLink.h +++ b/src/comm/QGCMAVLink.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -14,8 +14,7 @@ * @author Lorenz Meier */ -#ifndef QGCMAVLINK_H -#define QGCMAVLINK_H +#pragma once #define MAVLINK_USE_MESSAGE_INFO #define MAVLINK_EXTERNAL_RX_STATUS // Single m_mavlink_status instance is in QGCApplication.cc @@ -33,5 +32,4 @@ public: static bool isVTOL(MAV_TYPE mavType); }; -#endif // QGCMAVLINK_H diff --git a/src/comm/QGCSerialPortInfo.h b/src/comm/QGCSerialPortInfo.h index 6937ac728f..85d78ec682 100644 --- a/src/comm/QGCSerialPortInfo.h +++ b/src/comm/QGCSerialPortInfo.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -8,8 +8,7 @@ ****************************************************************************/ -#ifndef QGCSerialPortInfo_H -#define QGCSerialPortInfo_H +#pragma once #ifdef __android__ #include "qserialportinfo.h" @@ -91,4 +90,3 @@ private: static QList _boardFallbackList; }; -#endif diff --git a/src/comm/QGCXPlaneLink.h b/src/comm/QGCXPlaneLink.h index e6f9222107..466f187ba9 100644 --- a/src/comm/QGCXPlaneLink.h +++ b/src/comm/QGCXPlaneLink.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -15,8 +15,7 @@ * */ -#ifndef QGCXPLANESIMULATIONLINK_H -#define QGCXPLANESIMULATIONLINK_H +#pragma once #include #include @@ -235,4 +234,3 @@ protected: void sendDataRef(QString ref, float value); }; -#endif // QGCXPLANESIMULATIONLINK_H diff --git a/src/comm/SerialInterface.h b/src/comm/SerialInterface.h index afecc2b4a3..5fcef72ec3 100644 --- a/src/comm/SerialInterface.h +++ b/src/comm/SerialInterface.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -16,8 +16,7 @@ * */ -#ifndef SERIALINTERFACE_H -#define SERIALINTERFACE_H +#pragma once #include #include @@ -201,6 +200,5 @@ public: } }; -#endif // SERIALINTERFACE_H // vim:ts=4:sw=4:tw=78:expandtab: diff --git a/src/comm/SerialLink.h b/src/comm/SerialLink.h index 82fe598d8c..47f502063a 100644 --- a/src/comm/SerialLink.h +++ b/src/comm/SerialLink.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -16,8 +16,7 @@ * */ -#ifndef SERIALLINK_H -#define SERIALLINK_H +#pragma once class LinkInterface; class SerialConfiguration; @@ -194,4 +193,3 @@ signals: }; -#endif // SERIALLINK_H diff --git a/src/comm/TCPLink.h b/src/comm/TCPLink.h index 907af9cbc5..35a3c22c8a 100644 --- a/src/comm/TCPLink.h +++ b/src/comm/TCPLink.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -13,8 +13,7 @@ /// /// @author Don Gagne -#ifndef TCPLINK_H -#define TCPLINK_H +#pragma once #include #include @@ -188,4 +187,3 @@ private: QMutex _statisticsMutex; }; -#endif // TCPLINK_H diff --git a/src/comm/UDPLink.h b/src/comm/UDPLink.h index e88782e04c..1f76b9e269 100644 --- a/src/comm/UDPLink.h +++ b/src/comm/UDPLink.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * (c) 2009-2016 QGROUNDCONTROL PROJECT + * (c) 2009-2018 QGROUNDCONTROL PROJECT * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. @@ -15,8 +15,7 @@ * */ -#ifndef UDPLINK_H -#define UDPLINK_H +#pragma once #include #include @@ -204,4 +203,3 @@ private: }; -#endif // UDPLINK_H -- GitLab