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/cdqueue.h | |
parent | a2e78ec8dd5e935b6ef166154be7ee35bffc6d32 (diff) |
Enable -Wsuggest-override by default. (#1643)
Adds missing override keywords.
Diffstat (limited to 'src/context/cdqueue.h')
-rw-r--r-- | src/context/cdqueue.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/context/cdqueue.h b/src/context/cdqueue.h index 1df985b48..305e2de77 100644 --- a/src/context/cdqueue.h +++ b/src/context/cdqueue.h @@ -60,7 +60,8 @@ protected: /** Implementation of mandatory ContextObj method save: * We assume that the base class do the job inside their copy constructor. */ - ContextObj* save(ContextMemoryManager* pCMM) { + ContextObj* save(ContextMemoryManager* pCMM) override + { ContextObj* data = new(pCMM) CDQueue<T, CleanUp, Allocator>(*this); // We save the d_size in d_lastsave and we should never destruct below this // indices before the corresponding restore. @@ -80,7 +81,8 @@ protected: * restores the previous size, iter and lastsave indices. Note that * the list pointer and the allocated size are not changed. */ - void restore(ContextObj* data) { + void restore(ContextObj* data) override + { CDQueue<T, CleanUp, Allocator>* qdata = static_cast<CDQueue<T, CleanUp, Allocator>*>(data); d_iter = qdata->d_iter; d_lastsave = qdata->d_lastsave; |