diff --git a/include/macros.h b/include/macros.h index d732386..a22321c 100644 --- a/include/macros.h +++ b/include/macros.h @@ -40,13 +40,13 @@ #define TINS_END_PACK __pragma( pack(pop) ) #define TINS_PACKED(DECLARATION) __pragma( pack(push, 1) ) DECLARATION __pragma( pack(pop) ) #define TINS_DEPRECATED(func) __declspec(deprecated) func - #define NOEXCEPT + #define TINS_NOEXCEPT #else #define TINS_BEGIN_PACK #define TINS_END_PACK __attribute__((packed)) #define TINS_PACKED(DECLARATION) DECLARATION __attribute__((packed)) #define TINS_DEPRECATED(func) func __attribute__ ((deprecated)) - #define NOEXCEPT noexcept + #define TINS_NOEXCEPT noexcept #endif #endif diff --git a/include/packet.h b/include/packet.h index 1bc580d..f73d229 100644 --- a/include/packet.h +++ b/include/packet.h @@ -215,14 +215,14 @@ public: /** * Move constructor. */ - Packet(Packet &&rhs) NOEXCEPT : pdu_(rhs.pdu()), ts(rhs.timestamp()) { + Packet(Packet &&rhs) TINS_NOEXCEPT : pdu_(rhs.pdu()), ts(rhs.timestamp()) { rhs.pdu_ = nullptr; } /** * Move assignment operator. */ - Packet& operator=(Packet &&rhs) NOEXCEPT { + Packet& operator=(Packet &&rhs) TINS_NOEXCEPT { if(this != &rhs) { std::swap(pdu_, rhs.pdu_); ts = rhs.timestamp(); diff --git a/include/packet_sender.h b/include/packet_sender.h index c0bd7a2..037daa5 100644 --- a/include/packet_sender.h +++ b/include/packet_sender.h @@ -87,7 +87,7 @@ namespace Tins { * \brief Move constructor. * \param rhs The sender to be moved. */ - PacketSender(PacketSender &&rhs) NOEXCEPT { + PacketSender(PacketSender &&rhs) TINS_NOEXCEPT { *this = std::move(rhs); } @@ -95,7 +95,7 @@ namespace Tins { * \brief Move assignment operator. * \param rhs The sender to be moved. */ - PacketSender& operator=(PacketSender &&rhs) NOEXCEPT { + PacketSender& operator=(PacketSender &&rhs) TINS_NOEXCEPT { _sockets = std::move(rhs._sockets); rhs._sockets = std::vector(SOCKETS_END, INVALID_RAW_SOCKET); #ifndef WIN32 diff --git a/include/packet_writer.h b/include/packet_writer.h index d56d6b4..992dd7c 100644 --- a/include/packet_writer.h +++ b/include/packet_writer.h @@ -104,7 +104,7 @@ public: * * \param rhs The PacketWriter to be moved. */ - PacketWriter(PacketWriter &&rhs) NOEXCEPT { + PacketWriter(PacketWriter &&rhs) TINS_NOEXCEPT { *this = std::move(rhs); } @@ -116,7 +116,7 @@ public: * * \param rhs The PacketWriter to be moved. */ - PacketWriter& operator=(PacketWriter &&rhs) NOEXCEPT { + PacketWriter& operator=(PacketWriter &&rhs) TINS_NOEXCEPT { handle = 0; dumper = 0; std::swap(handle, rhs.handle); diff --git a/include/pdu.h b/include/pdu.h index da1c7dc..baa564c 100644 --- a/include/pdu.h +++ b/include/pdu.h @@ -149,7 +149,7 @@ namespace Tins { * * \param rhs The PDU to be moved. */ - PDU(PDU &&rhs) NOEXCEPT + PDU(PDU &&rhs) TINS_NOEXCEPT : _inner_pdu(0) { std::swap(_inner_pdu, rhs._inner_pdu); @@ -160,7 +160,7 @@ namespace Tins { * * \param rhs The PDU to be moved. */ - PDU& operator=(PDU &&rhs) NOEXCEPT { + PDU& operator=(PDU &&rhs) TINS_NOEXCEPT { std::swap(_inner_pdu, rhs._inner_pdu); return *this; } diff --git a/include/sniffer.h b/include/sniffer.h index 854dabd..2dc342a 100644 --- a/include/sniffer.h +++ b/include/sniffer.h @@ -68,7 +68,7 @@ namespace Tins { * \brief Move constructor. * This constructor is available only in C++11. */ - BaseSniffer(BaseSniffer &&rhs) NOEXCEPT + BaseSniffer(BaseSniffer &&rhs) TINS_NOEXCEPT : handle(nullptr), mask() { *this = std::move(rhs); @@ -78,7 +78,7 @@ namespace Tins { * \brief Move assignment operator. * This operator is available only in C++11. */ - BaseSniffer& operator=(BaseSniffer &&rhs) NOEXCEPT + BaseSniffer& operator=(BaseSniffer &&rhs) TINS_NOEXCEPT { using std::swap; swap(handle, rhs.handle);