mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
Use deleted members to prevent copying in Beast (RIPD-268)
This commit is contained in:
committed by
Vinnie Falco
parent
cd97b5beec
commit
60330da25c
@@ -27,7 +27,6 @@
|
||||
#include <cstring>
|
||||
|
||||
#include <beast/Config.h>
|
||||
#include <beast/Uncopyable.h>
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -78,12 +77,16 @@ Type* createCopyIfNotNull (const Type* pointer)
|
||||
/** A handy C++ wrapper that creates and deletes an NSAutoreleasePool object using RAII.
|
||||
You should use the BEAST_AUTORELEASEPOOL macro to create a local auto-release pool on the stack.
|
||||
*/
|
||||
class ScopedAutoReleasePool : public Uncopyable
|
||||
class ScopedAutoReleasePool
|
||||
{
|
||||
public:
|
||||
ScopedAutoReleasePool();
|
||||
~ScopedAutoReleasePool();
|
||||
|
||||
|
||||
ScopedAutoReleasePool(ScopedAutoReleasePool const&) = delete;
|
||||
ScopedAutoReleasePool& operator= (ScopedAutoReleasePool const&) = delete;
|
||||
|
||||
private:
|
||||
void* pool;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user