Commit 640b073b authored by David COME's avatar David COME
Browse files

Added postfix increment operator

parent 98046482
......@@ -41,6 +41,10 @@ template <class T> struct AtomicCounter{
threading::MutexLocker ml(&m_mutex);
return ++m_val;
}
T operator ++ (int) {
threading::MutexLocker ml(&m_mutex);
return m_val++;
}
T operator -- () {
threading::MutexLocker ml(&m_mutex);
return --m_val;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment