Skip to content

Commit

Permalink
Disabling more copy constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
wjwwood committed Jun 7, 2012
1 parent 088fcda commit 7714615
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/serial.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ class Serial::ScopedReadLock {
this->pimpl_->readUnlock();
}
private:
// Disable copy constructors
ScopedReadLock(const ScopedReadLock&);
void operator=(const ScopedReadLock&);
const ScopedReadLock& operator=(ScopedReadLock);

SerialImpl *pimpl_;
};

Expand All @@ -45,6 +50,10 @@ class Serial::ScopedWriteLock {
this->pimpl_->writeUnlock();
}
private:
// Disable copy constructors
ScopedWriteLock(const ScopedWriteLock&);
void operator=(const ScopedWriteLock&);
const ScopedWriteLock& operator=(ScopedWriteLock);
SerialImpl *pimpl_;
};

Expand Down

0 comments on commit 7714615

Please sign in to comment.