From d429dd0aeec5a84427223d2390a683095d2743ce Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 13 Jan 2024 12:36:49 +0000 Subject: Default destructor for trivial types of glContainer --- lib/glContainer.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/glContainer.h b/lib/glContainer.h index ecba30d..bfab57b 100644 --- a/lib/glContainer.h +++ b/lib/glContainer.h @@ -122,11 +122,14 @@ public: allocBuffer(1); } - ~glContainer() noexcept(is_trivial_dest) + ~glContainer() + requires(is_trivial_dest) + = default; + + ~glContainer() + requires(!is_trivial_dest) { - if constexpr (!is_trivial_dest) { - clear(); - } + clear(); } DEFAULT_MOVE_NO_COPY(glContainer); -- cgit v1.2.3