[beast: 22/29] BEAST: fix RowShading enum value to int64 conversion
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 22/29] BEAST: fix RowShading enum value to int64 conversion
- Date: Mon, 21 Mar 2016 15:14:02 +0000 (UTC)
commit b498b6785e1d5982795901777fbb161886ec4474
Author: Tim Janik <timj gnu org>
Date: Tue Feb 2 23:48:46 2016 +0100
BEAST: fix RowShading enum value to int64 conversion
Signed-off-by: Tim Janik <timj gnu org>
beast-gtk/bstpatternctrl.cc | 35 ++++++++++++++++++-----------------
1 files changed, 18 insertions(+), 17 deletions(-)
---
diff --git a/beast-gtk/bstpatternctrl.cc b/beast-gtk/bstpatternctrl.cc
index dc3af79..c259730 100644
--- a/beast-gtk/bstpatternctrl.cc
+++ b/beast-gtk/bstpatternctrl.cc
@@ -64,24 +64,25 @@ pattern_controller_row_shading_notify (gpointer notify_data,
BstPatternController *self = (BstPatternController*) notify_data;
BstPatternView *pview = self->pview;
static const struct { int value, r1, r2, r3, r4; } choices[] = {
- { ROW_SHADING_NONE, 0, 0, 0, 0 },
- { ROW_SHADING_2, 2 },
- { ROW_SHADING_4, 4 },
- { ROW_SHADING_8, 8 },
- { ROW_SHADING_16, 16 },
- { ROW_SHADING_2_4, 4, 2 },
- { ROW_SHADING_4_8, 8, 4 },
- { ROW_SHADING_4_12, 12, 4 },
- { ROW_SHADING_4_16, 16, 4 },
- { ROW_SHADING_8_16, 16, 8 },
- { ROW_SHADING_3, 3 },
- { ROW_SHADING_6, 6 },
- { ROW_SHADING_12, 12 },
- { ROW_SHADING_3_6, 6, 3 },
- { ROW_SHADING_3_12, 12, 3 },
- { ROW_SHADING_6_12, 12, 6 },
+ { int64 (RowShading::ROW_SHADING_NONE), 0, 0, 0, 0 },
+ { int64 (RowShading::ROW_SHADING_2), 2 },
+ { int64 (RowShading::ROW_SHADING_4), 4 },
+ { int64 (RowShading::ROW_SHADING_8), 8 },
+ { int64 (RowShading::ROW_SHADING_16), 16 },
+ { int64 (RowShading::ROW_SHADING_2_4), 4, 2 },
+ { int64 (RowShading::ROW_SHADING_4_8), 8, 4 },
+ { int64 (RowShading::ROW_SHADING_4_12), 12, 4 },
+ { int64 (RowShading::ROW_SHADING_4_16), 16, 4 },
+ { int64 (RowShading::ROW_SHADING_8_16), 16, 8 },
+ { int64 (RowShading::ROW_SHADING_3), 3 },
+ { int64 (RowShading::ROW_SHADING_6), 6 },
+ { int64 (RowShading::ROW_SHADING_12), 12 },
+ { int64 (RowShading::ROW_SHADING_3_6), 6, 3 },
+ { int64 (RowShading::ROW_SHADING_3_12), 12, 3 },
+ { int64 (RowShading::ROW_SHADING_6_12), 12, 6 },
};
- int r1 = 0, r2 = 0, r3 = 0, r4 = 0, vsval = Rapicorn::Aida::enum_value_from_string<RowShading>
(sfi_value_get_choice (&self->row_shading->value));
+ int r1 = 0, r2 = 0, r3 = 0, r4 = 0;
+ const int64 vsval = int64 (Rapicorn::Aida::enum_value_from_string<RowShading> (sfi_value_get_choice
(&self->row_shading->value)));
for (uint i = 0; i < G_N_ELEMENTS (choices); i++)
if (choices[i].value == vsval)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]