瀏覽代碼

Don't allow copying BufferedFile

Tatsuhiro Tsujikawa 14 年之前
父節點
當前提交
6034474550
共有 1 個文件被更改,包括 4 次插入0 次删除
  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_;