[beast: 24/29] SFI: sfidl-cbase.cc: add int64 conversions around enum value use in arithmetics
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 24/29] SFI: sfidl-cbase.cc: add int64 conversions around enum value use in arithmetics
- Date: Mon, 21 Mar 2016 15:14:12 +0000 (UTC)
commit 15c3420b7125c16ba5c528091b049f02556ca41c
Author: Tim Janik <timj gnu org>
Date: Thu Feb 4 16:28:19 2016 +0100
SFI: sfidl-cbase.cc: add int64 conversions around enum value use in arithmetics
Signed-off-by: Tim Janik <timj gnu org>
sfi/sfidl-cbase.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sfi/sfidl-cbase.cc b/sfi/sfidl-cbase.cc
index 99a3d6d..baef540 100644
--- a/sfi/sfidl-cbase.cc
+++ b/sfi/sfidl-cbase.cc
@@ -614,8 +614,8 @@ void CodeGeneratorCBase::printChoiceConverters()
printf("const gchar*\n");
printf("%s_to_choice (%s value)\n", name.c_str(), arg.c_str());
printf("{\n");
- printf(" assert_return (value >= %d && value <= %d, NULL);\n", minval, maxval);
- printf(" return sfi_constants_get_name (G_N_ELEMENTS (%s_vals), %s_vals, value);\n",
+ printf(" assert_return (int64 (value) >= %d && int64 (value) <= %d, NULL);\n", minval, maxval);
+ printf(" return sfi_constants_get_name (G_N_ELEMENTS (%s_vals), %s_vals, int64 (value));\n",
name.c_str(), name.c_str());
printf("}\n\n");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]