From ef3c8ceb2fee42f07c7c02fb31cc92e6146a9c03 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 10 Feb 2021 11:49:21 +0900 Subject: [PATCH] Refactoring for increasing readability Change-Id: Id4bb22de0da5f60169546efd5f36c58d4f545c62 Signed-off-by: Jihoon Kim --- src/ise.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ise.cpp b/src/ise.cpp index cf10f5c..ea84389 100644 --- a/src/ise.cpp +++ b/src/ise.cpp @@ -1542,11 +1542,16 @@ ise_show(int ic) } if (ic == keyboard_state->focused_ic) { - if (keyboard_state->layout == ISE_LAYOUT_STYLE_PHONENUMBER || - keyboard_state->layout == ISE_LAYOUT_STYLE_IP || - keyboard_state->layout == ISE_LAYOUT_STYLE_MONTH || - keyboard_state->layout == ISE_LAYOUT_STYLE_NUMBERONLY) { - ime_set_imengine(DEFAULT_KEYBOARD_ISE_UUID); + switch (keyboard_state->layout) + { + case ISE_LAYOUT_STYLE_PHONENUMBER: + case ISE_LAYOUT_STYLE_IP: + case ISE_LAYOUT_STYLE_MONTH: + case ISE_LAYOUT_STYLE_NUMBERONLY: + ime_set_imengine(DEFAULT_KEYBOARD_ISE_UUID); + break; + default: + break; } } -- 2.7.4