mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 02:28:53 +08:00
BlockAllocator: Delete copy ctor and assignment operator
This commit is contained in:
@@ -62,6 +62,12 @@ struct BlockAllocator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BlockAllocator(BlockAllocator &&) = default;
|
||||||
|
BlockAllocator &operator=(BlockAllocator &&) = default;
|
||||||
|
|
||||||
|
BlockAllocator(const BlockAllocator &) = delete;
|
||||||
|
BlockAllocator &operator=(const BlockAllocator &) = delete;
|
||||||
|
|
||||||
MemBlock *alloc_mem_block(size_t size) {
|
MemBlock *alloc_mem_block(size_t size) {
|
||||||
auto block = new uint8_t[sizeof(MemBlock) + size];
|
auto block = new uint8_t[sizeof(MemBlock) + size];
|
||||||
auto mb = reinterpret_cast<MemBlock *>(block);
|
auto mb = reinterpret_cast<MemBlock *>(block);
|
||||||
|
|||||||
Reference in New Issue
Block a user