Browse Source

Don't allow copying BufferedFile

Tatsuhiro Tsujikawa 14 năm trước cách đây
mục cha
commit
6034474550
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      src/BufferedFile.h

+ 4 - 0
src/BufferedFile.h

@@ -70,6 +70,10 @@ public:
   // Mode for writing
   static const std::string WRITE;
 private:
+  // Don't allow copying
+  BufferedFile(const BufferedFile&);
+  BufferedFile& operator=(const BufferedFile&);
+
   FILE* fp_;
   // true when file has been opened.
   bool open_;