Common: Delete Pool's copy constructor and copy/move assignment operators (#117)
The language defines a copy constructor as: TypeName(const TypeName&) so this was just deleting a constructor variant that would catch most cases of attempted copies.
This commit is contained in:
parent
77fe2aeeaa
commit
522992965a
1 changed files with 4 additions and 1 deletions
|
@ -21,9 +21,12 @@ public:
|
||||||
Pool(size_t object_size, size_t initial_pool_size);
|
Pool(size_t object_size, size_t initial_pool_size);
|
||||||
~Pool();
|
~Pool();
|
||||||
|
|
||||||
Pool(Pool&) = delete;
|
Pool(const Pool&) = delete;
|
||||||
Pool(Pool&&) = delete;
|
Pool(Pool&&) = delete;
|
||||||
|
|
||||||
|
Pool& operator=(const Pool&) = delete;
|
||||||
|
Pool& operator=(Pool&&) = delete;
|
||||||
|
|
||||||
/// Returns a pointer to an `object_size`-bytes block of memory.
|
/// Returns a pointer to an `object_size`-bytes block of memory.
|
||||||
void* Alloc();
|
void* Alloc();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue