diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-08-23 07:06:40 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-08-23 07:06:40 +0000 |
commit | 27339377a5fea608598960ec9d576673c2b64b55 (patch) | |
tree | 9604cac5e305d2dfd88b303d7c862d7118209f58 /vespalib | |
parent | da2a54fc4abdd31a783ed63292ea7f9c3c5cc551 (diff) |
Add final
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/util/stash.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vespalib/src/vespa/vespalib/util/stash.h b/vespalib/src/vespa/vespalib/util/stash.h index 990f69fe4ed..2be352e6381 100644 --- a/vespalib/src/vespa/vespalib/util/stash.h +++ b/vespalib/src/vespa/vespalib/util/stash.h @@ -29,13 +29,15 @@ struct DeleteMemory final : public Cleanup { }; // used as prefix for objects to be destructed -template<typename T> struct DestructObject : public Cleanup { +template<typename T> +struct DestructObject final : public Cleanup { explicit DestructObject(Cleanup *next_in) noexcept : Cleanup(next_in) {} void cleanup() override { reinterpret_cast<T*>(this + 1)->~T(); } }; // used as prefix for arrays to be destructed -template<typename T> struct DestructArray : public Cleanup { +template<typename T> +struct DestructArray final : public Cleanup { size_t size; explicit DestructArray(Cleanup *next_in, size_t size_in) noexcept : Cleanup(next_in), size(size_in) {} |