mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 21:53:35 +08:00
-Wold-style-cast; linked list items made noncopyable
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
#include <uavcan/build_config.hpp>
|
||||
#include <uavcan/util/templates.hpp>
|
||||
|
||||
namespace uavcan
|
||||
{
|
||||
@@ -16,7 +17,7 @@ namespace uavcan
|
||||
* Classes that are supposed to be linked-listed should derive this.
|
||||
*/
|
||||
template <typename T>
|
||||
class UAVCAN_EXPORT LinkedListNode
|
||||
class UAVCAN_EXPORT LinkedListNode : Noncopyable
|
||||
{
|
||||
T* next_;
|
||||
|
||||
@@ -40,7 +41,7 @@ public:
|
||||
* Linked list root.
|
||||
*/
|
||||
template <typename T>
|
||||
class UAVCAN_EXPORT LinkedListRoot
|
||||
class UAVCAN_EXPORT LinkedListRoot : Noncopyable
|
||||
{
|
||||
T* root_;
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class UAVCAN_EXPORT Multiset : Noncopyable
|
||||
};
|
||||
|
||||
private:
|
||||
struct Chunk : LinkedListNode<Chunk>, ::uavcan::Noncopyable
|
||||
struct Chunk : LinkedListNode<Chunk>
|
||||
{
|
||||
enum { NumItems = (MemPoolBlockSize - sizeof(LinkedListNode<Chunk>)) / sizeof(Item) };
|
||||
Item items[NumItems];
|
||||
|
||||
Reference in New Issue
Block a user