diff options
author | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2023-08-11 11:58:33 +0200 |
---|---|---|
committer | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2023-08-11 11:58:33 +0200 |
commit | b9b51f9579c15c9789814cd4b6969b0f85e13980 (patch) | |
tree | 8d201ba2061e244b139057abd0ca5273f443095c /src/libstore/build/substitution-goal.hh | |
parent | a1fdc68c655e8d7ece51b6c84796d35203386c87 (diff) |
Prevent overriding virtual methods that are called in a destructor
Virtual methods are no longer valid once the derived destructor has
run. This means the compiler is free to optimize them to be
non-virtual.
Found using clang-tidy
Diffstat (limited to 'src/libstore/build/substitution-goal.hh')
-rw-r--r-- | src/libstore/build/substitution-goal.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/build/substitution-goal.hh b/src/libstore/build/substitution-goal.hh index 9fc041920..1b693baa1 100644 --- a/src/libstore/build/substitution-goal.hh +++ b/src/libstore/build/substitution-goal.hh @@ -114,7 +114,8 @@ public: void handleChildOutput(int fd, std::string_view data) override; void handleEOF(int fd) override; - void cleanup() override; + /* Called by destructor, can't be overridden */ + void cleanup() override final; JobCategory jobCategory() override { return JobCategory::Substitution; }; }; |