Use deleted members to prevent copying in Beast (RIPD-268)

This commit is contained in:
Nik Bougalis
2014-09-25 11:13:38 -07:00
committed by Vinnie Falco
parent cd97b5beec
commit 60330da25c
48 changed files with 255 additions and 191 deletions

View File

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

View File

@@ -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

View File

@@ -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.