mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibTest: Use Array instead of fold expression in __testjs_last()
This avoids a -Wunused-value warning with clang-14.
This commit is contained in:
parent
e2e9560580
commit
d1e3470438
1 changed files with 5 additions and 1 deletions
|
@ -107,7 +107,11 @@ template<typename... Args>
|
|||
static consteval size_t __testjs_count(Args...) { return sizeof...(Args); }
|
||||
|
||||
template<auto... Values>
|
||||
static consteval size_t __testjs_last() { return (AK::Detail::IntegralConstant<size_t, Values> {}, ...).value; }
|
||||
static consteval size_t __testjs_last()
|
||||
{
|
||||
Array values { Values... };
|
||||
return values[values.size() - 1U];
|
||||
}
|
||||
|
||||
static constexpr auto TOP_LEVEL_TEST_NAME = "__$$TOP_LEVEL$$__";
|
||||
extern RefPtr<JS::VM> g_vm;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue