[gjs/mcatanzaro/#357] Fix 32-bit build
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/mcatanzaro/#357] Fix 32-bit build
- Date: Thu, 22 Oct 2020 00:31:58 +0000 (UTC)
commit 6c00db3463811d47bd79af318551e7d1ecc874b1
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Wed Oct 21 19:26:57 2020 -0500
Fix 32-bit build
Problem is that each separate 'if constexpr' block needs to evaluate to
the same return type. The first block returns GType (long unsigned int),
but the second block returns uint32_t (unsigned int), and that fails to
build.
To fix this, we can just join everything into one big 'if constexpr'.
Thanks to Abderrahim for preparing an earlier version of this fix, and
to both Abderrahim and Jordan for helping me with BuildStream to do an
i686 build.
Fixes #357
gi/js-value-inl.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gi/js-value-inl.h b/gi/js-value-inl.h
index 03c0bb19..fe4c2a3c 100644
--- a/gi/js-value-inl.h
+++ b/gi/js-value-inl.h
@@ -52,9 +52,7 @@ constexpr auto get_strict() {
return gboolean{};
else
return;
- }
-
- if constexpr (std::is_same_v<T, char32_t>)
+ } else if constexpr (std::is_same_v<T, char32_t>)
return char32_t{};
else if constexpr (type_fits<T, int32_t>())
return int32_t{};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]