From 805b4096e922e46b1b8cf93415f08046e9a074eb Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 7 Dec 2023 23:50:35 +0200 Subject: [PATCH] BAN: Remove empty else. Builds with -Wall -Wextra --- BAN/include/BAN/Variant.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BAN/include/BAN/Variant.h b/BAN/include/BAN/Variant.h index 8c7fbae2..02651cce 100644 --- a/BAN/include/BAN/Variant.h +++ b/BAN/include/BAN/Variant.h @@ -42,9 +42,10 @@ namespace BAN void destruct(size_t index, uint8_t* data) { if (index == 0) + { if constexpr(!is_lvalue_reference_v) reinterpret_cast(data)->~T(); - else; + } else if constexpr(sizeof...(Ts) > 0) destruct(index - 1, data); else