mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +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
@@ -36,7 +36,6 @@ namespace beast
|
||||
class FileInputSource
|
||||
: public InputSource
|
||||
, LeakChecked <FileInputSource>
|
||||
, public Uncopyable
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
@@ -47,6 +46,9 @@ public:
|
||||
*/
|
||||
FileInputSource (const File& file, bool useFileTimeInHashGeneration = false);
|
||||
|
||||
FileInputSource (FileInputSource const&) = delete;
|
||||
FileInputSource& operator= (FileInputSource const&) = delete;
|
||||
|
||||
/** Destructor. */
|
||||
~FileInputSource();
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ class MemoryBlock;
|
||||
@see OutputStream, FileInputStream
|
||||
*/
|
||||
class InputStream
|
||||
: public Uncopyable
|
||||
, LeakChecked <InputStream>
|
||||
{
|
||||
public:
|
||||
@@ -352,7 +351,9 @@ public:
|
||||
|
||||
protected:
|
||||
//==============================================================================
|
||||
InputStream() noexcept {}
|
||||
InputStream() = default;
|
||||
InputStream (InputStream const&) = delete;
|
||||
InputStream& operator= (InputStream const&) = delete;
|
||||
};
|
||||
|
||||
} // beast
|
||||
|
||||
@@ -40,12 +40,15 @@ class File;
|
||||
|
||||
@see InputStream, MemoryOutputStream, FileOutputStream
|
||||
*/
|
||||
class OutputStream : public Uncopyable
|
||||
class OutputStream
|
||||
{
|
||||
protected:
|
||||
//==============================================================================
|
||||
OutputStream();
|
||||
|
||||
OutputStream (OutputStream const&) = delete;
|
||||
OutputStream& operator= (OutputStream const&) = delete;
|
||||
|
||||
public:
|
||||
/** Destructor.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user