diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2014-09-26 20:30:57 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2014-09-26 20:31:18 +0200 |
commit | 64cfaf891fe539b36f6be37dac6c28a712d70b96 (patch) | |
tree | 520c1e99eb70e7fd0ea85305b357d107f021a2a8 /src/serialize.h | |
parent | 610a3d3a1bd171b963600c55fab715ca2aa30da3 (diff) | |
parent | 6eb67b0ed2b350b772f7edb67aee1bcf09c91b0b (diff) | |
download | bitcoin-64cfaf891fe539b36f6be37dac6c28a712d70b96.tar.xz |
Merge pull request #4986
6eb67b0 autofile: Disallow by-value copies of CAutoFile (Cory Fields)
eee030f autofile: don't copy CAutoFile by value (Cory Fields)
Diffstat (limited to 'src/serialize.h')
-rw-r--r-- | src/serialize.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/serialize.h b/src/serialize.h index 447d808dee..7f8f933284 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -1154,7 +1154,7 @@ public: -/** RAII wrapper for FILE*. +/** Non-refcounted RAII wrapper for FILE*. * * Will automatically close the file when it goes out of scope if not null. * If you're returning the file pointer, return file.release(). @@ -1162,6 +1162,10 @@ public: */ class CAutoFile { +private: + // Disallow copies + CAutoFile(const CAutoFile&); + CAutoFile& operator=(const CAutoFile&); protected: FILE* file; public: |