From 69c4f99e3bb19b2a1bd1ae7b80b0ae3cbe159326 Mon Sep 17 00:00:00 2001 From: "Stephen F. Booth" Date: Sat, 7 Dec 2024 23:30:04 -0600 Subject: [PATCH] Attempt to fix `static_assert` --- taglib/shn/shnfile.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/taglib/shn/shnfile.cpp b/taglib/shn/shnfile.cpp index d3f5f7fc..e54c318f 100644 --- a/taglib/shn/shnfile.cpp +++ b/taglib/shn/shnfile.cpp @@ -226,19 +226,22 @@ namespace { if constexpr (std::is_same_v) { if(big != system_big) value = Utils::byteSwap(static_cast(value)); + return value; } else if constexpr (std::is_same_v) { if(big != system_big) value = Utils::byteSwap(static_cast(value)); + return value; } else if constexpr (std::is_same_v) { if(big != system_big) value = Utils::byteSwap(static_cast(value)); + return value; } else static_assert(false, "Invalid typename T"); - return value; + return 0; } uint64_t read_uint_big64(void *p, uintptr_t n) noexcept