From 22c51b28e3a393e2310ff98a61938f2456715662 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Thu, 18 Jun 2015 18:46:54 +0300 Subject: [PATCH] Smarter use of UAVCAN_PACKED_* --- libuavcan/include/uavcan/driver/can.hpp | 2 -- .../include/uavcan/transport/outgoing_transfer_registry.hpp | 2 -- libuavcan/include/uavcan/transport/transfer_buffer.hpp | 2 -- libuavcan/include/uavcan/util/map.hpp | 2 -- 4 files changed, 8 deletions(-) diff --git a/libuavcan/include/uavcan/driver/can.hpp b/libuavcan/include/uavcan/driver/can.hpp index 3fca51c9ed..a15ba2d3f9 100644 --- a/libuavcan/include/uavcan/driver/can.hpp +++ b/libuavcan/include/uavcan/driver/can.hpp @@ -16,7 +16,6 @@ namespace uavcan /** * Raw CAN frame, as passed to/from the CAN driver. */ -UAVCAN_PACKED_BEGIN struct UAVCAN_EXPORT CanFrame { static const uint32_t MaskStdID = 0x000007FFU; @@ -74,7 +73,6 @@ struct UAVCAN_EXPORT CanFrame bool priorityHigherThan(const CanFrame& rhs) const; bool priorityLowerThan(const CanFrame& rhs) const { return rhs.priorityHigherThan(*this); } }; -UAVCAN_PACKED_END /** * CAN hardware filter config struct. diff --git a/libuavcan/include/uavcan/transport/outgoing_transfer_registry.hpp b/libuavcan/include/uavcan/transport/outgoing_transfer_registry.hpp index 2dbc508118..f1e5785090 100644 --- a/libuavcan/include/uavcan/transport/outgoing_transfer_registry.hpp +++ b/libuavcan/include/uavcan/transport/outgoing_transfer_registry.hpp @@ -76,13 +76,11 @@ public: template class UAVCAN_EXPORT OutgoingTransferRegistry : public IOutgoingTransferRegistry, Noncopyable { - UAVCAN_PACKED_BEGIN struct Value { MonotonicTime deadline; TransferID tid; }; - UAVCAN_PACKED_END class DeadlineExpiredPredicate { diff --git a/libuavcan/include/uavcan/transport/transfer_buffer.hpp b/libuavcan/include/uavcan/transport/transfer_buffer.hpp index 0911f106e4..977bd3e368 100644 --- a/libuavcan/include/uavcan/transport/transfer_buffer.hpp +++ b/libuavcan/include/uavcan/transport/transfer_buffer.hpp @@ -16,7 +16,6 @@ namespace uavcan { -UAVCAN_PACKED_BEGIN /** * Internal for TransferBufferManager */ @@ -136,7 +135,6 @@ public: virtual int read(unsigned offset, uint8_t* data, unsigned len) const; virtual int write(unsigned offset, const uint8_t* data, unsigned len); }; -UAVCAN_PACKED_END /** * Standalone static buffer diff --git a/libuavcan/include/uavcan/util/map.hpp b/libuavcan/include/uavcan/util/map.hpp index 95b0a1fd71..9c43394ba3 100644 --- a/libuavcan/include/uavcan/util/map.hpp +++ b/libuavcan/include/uavcan/util/map.hpp @@ -36,7 +36,6 @@ class UAVCAN_EXPORT MapBase : Noncopyable { template friend class Map; - UAVCAN_PACKED_BEGIN public: struct KVPair { @@ -100,7 +99,6 @@ private: return NULL; } }; - UAVCAN_PACKED_END LinkedListRoot list_; IPoolAllocator& allocator_;