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:
Mat M 2017-11-12 03:52:34 -05:00 committed by MerryMage
parent 77fe2aeeaa
commit 522992965a

View file

@ -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();