diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-03-05 15:36:50 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-05 15:36:50 -0800 |
commit | 3d31caa30e094d337a4919b3d1e6ba9259e461b8 (patch) | |
tree | e99bc99c2ce450f7d0c4fa8c0938b24e886af996 /src/context/cdlist.h | |
parent | a2e78ec8dd5e935b6ef166154be7ee35bffc6d32 (diff) |
Enable -Wsuggest-override by default. (#1643)
Adds missing override keywords.
Diffstat (limited to 'src/context/cdlist.h')
-rw-r--r-- | src/context/cdlist.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/context/cdlist.h b/src/context/cdlist.h index aeb6567a3..e5f9f2dda 100644 --- a/src/context/cdlist.h +++ b/src/context/cdlist.h @@ -165,7 +165,8 @@ private: * restored on a pop). The saved information is allocated using the * ContextMemoryManager. */ - ContextObj* save(ContextMemoryManager* pCMM) { + ContextObj* save(ContextMemoryManager* pCMM) override + { ContextObj* data = new(pCMM) CDList<T, CleanUp, Allocator>(*this); Debug("cdlist") << "save " << this << " at level " << this->getContext()->getLevel() @@ -182,17 +183,17 @@ protected: * restores the previous size. Note that the list pointer and the * allocated size are not changed. */ - void restore(ContextObj* data) { - Debug("cdlist") << "restore " << this - << " level " << this->getContext()->getLevel() - << " data == " << data - << " call dtor == " << this->d_callDestructor - << " d_list == " << this->d_list << std::endl; - truncateList(((CDList<T, CleanUp, Allocator>*)data)->d_size); - Debug("cdlist") << "restore " << this - << " level " << this->getContext()->getLevel() - << " size back to " << this->d_size - << " sizeAlloc at " << this->d_sizeAlloc << std::endl; + void restore(ContextObj* data) override + { + Debug("cdlist") << "restore " << this << " level " + << this->getContext()->getLevel() << " data == " << data + << " call dtor == " << this->d_callDestructor + << " d_list == " << this->d_list << std::endl; + truncateList(((CDList<T, CleanUp, Allocator>*)data)->d_size); + Debug("cdlist") << "restore " << this << " level " + << this->getContext()->getLevel() << " size back to " + << this->d_size << " sizeAlloc at " << this->d_sizeAlloc + << std::endl; } /** |