Forráskód Böngészése

Don't allow copying BufferedFile

Tatsuhiro Tsujikawa 14 éve
szülő
commit
6034474550
1 módosított fájl, 4 hozzáadás és 0 törlés
  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_;