mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 14:03:34 +08:00
CAN HW filters are added using map container
This commit is contained in:
@@ -36,22 +36,22 @@ class UAVCAN_EXPORT MapBase : Noncopyable
|
||||
{
|
||||
template <typename, typename, unsigned> friend class Map;
|
||||
|
||||
UAVCAN_PACKED_BEGIN
|
||||
public:
|
||||
struct KVPair
|
||||
{
|
||||
Value value; // Key and value are swapped because this may allow to reduce padding (depending on types)
|
||||
Key key;
|
||||
Value value;
|
||||
|
||||
KVPair()
|
||||
: key()
|
||||
, value()
|
||||
KVPair() :
|
||||
value(),
|
||||
key()
|
||||
{ }
|
||||
|
||||
KVPair(const Key& arg_key, const Value& arg_value)
|
||||
: key(arg_key)
|
||||
, value(arg_value)
|
||||
KVPair(const Key& arg_key, const Value& arg_value) :
|
||||
value(arg_value),
|
||||
key(arg_key)
|
||||
{ }
|
||||
|
||||
bool match(const Key& rhs) const { return rhs == key; }
|
||||
};
|
||||
|
||||
@@ -99,7 +99,6 @@ private:
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
UAVCAN_PACKED_END
|
||||
|
||||
LinkedListRoot<KVGroup> list_;
|
||||
IPoolAllocator& allocator_;
|
||||
|
||||
Reference in New Issue
Block a user