Permalink
Browse files

Disallow copy and assign

  • Loading branch information...
JayXon committed Sep 8, 2018
1 parent 78d9ae9 commit 95ab16557ab1ddd7df0b03a1743a73f4b4ba1e3a
Showing with 8 additions and 0 deletions.
  1. +4 −0 fileio.h
  2. +4 −0 formats/format.h
@@ -29,6 +29,10 @@ class File {
UnMapFile(size_);
}

// Disallow copy and assign.
File(const File&) = delete;
File& operator=(const File&) = delete;

void* GetFilePionter() const {
return fp_;
}
@@ -13,6 +13,10 @@ class Format {

virtual ~Format() = default;

// Disallow copy and assign.
Format(const Format&) = delete;
Format& operator=(const Format&) = delete;

virtual size_t Leanify(size_t size_leanified = 0) {
if (size_leanified) {
memmove(fp_ - size_leanified, fp_, size_);

0 comments on commit 95ab165

Please sign in to comment.