-Wold-style-cast; linked list items made noncopyable

This commit is contained in:
Pavel Kirienko
2016-07-29 16:46:57 +03:00
parent 32d8851dde
commit c9ec822244
12 changed files with 48 additions and 32 deletions
@@ -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_;
+1 -1
View File
@@ -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];