summaryrefslogtreecommitdiff
path: root/src/context/cdlist.h
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2018-03-05 15:36:50 -0800
committerGitHub <noreply@github.com>2018-03-05 15:36:50 -0800
commit3d31caa30e094d337a4919b3d1e6ba9259e461b8 (patch)
treee99bc99c2ce450f7d0c4fa8c0938b24e886af996 /src/context/cdlist.h
parenta2e78ec8dd5e935b6ef166154be7ee35bffc6d32 (diff)
Enable -Wsuggest-override by default. (#1643)
Adds missing override keywords.
Diffstat (limited to 'src/context/cdlist.h')
-rw-r--r--src/context/cdlist.h25
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;
}
/**
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback