diff options
author | Jihoon Kim <jihoon48.kim@samsung.com> | 2017-07-31 17:08:55 +0900 |
---|---|---|
committer | Jihoon Kim <jihoon48.kim@samsung.com> | 2017-07-31 08:10:07 +0000 |
commit | 328dfed34e249c2f5bffbd71cfdb194b638f50af (patch) | |
tree | a5ac1c0240f34184b9cb24a5e95158346d5739ff | |
parent | aae0094aab8324fd14abe8d8461c6d9d30d2c381 (diff) | |
download | ise-engine-anthy-accepted/tizen_3.0_common.tar.gz ise-engine-anthy-accepted/tizen_3.0_common.tar.bz2 ise-engine-anthy-accepted/tizen_3.0_common.zip |
Fix issues detected by static analysis toolsubmit/tizen_3.0/20170731.095857accepted/tizen/3.0/tv/20170801.062002accepted/tizen/3.0/mobile/20170801.061943accepted/tizen/3.0/ivi/20170801.062038accepted/tizen/3.0/common/20170801.163341tizen_3.0accepted/tizen_3.0_tvaccepted/tizen_3.0_mobileaccepted/tizen_3.0_iviaccepted/tizen_3.0_common
Change-Id: If14691fd381a2ff3d4268dd996848e766e07416b
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
-rwxr-xr-x | src/scim_anthy_preedit.cpp | 18 | ||||
-rwxr-xr-x | src/scim_anthy_style_file.cpp | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/scim_anthy_preedit.cpp b/src/scim_anthy_preedit.cpp index c828e06..4037e51 100755 --- a/src/scim_anthy_preedit.cpp +++ b/src/scim_anthy_preedit.cpp @@ -587,16 +587,16 @@ get_period_rule (TypingMethod method, PeriodStyle period) } static ConvRule * -get_comma_rule (TypingMethod method, CommaStyle period) +get_comma_rule (TypingMethod method, CommaStyle comma) { switch (method) { case SCIM_ANTHY_TYPING_METHOD_KANA: - switch (period) { - case SCIM_ANTHY_PERIOD_WIDE: + switch (comma) { + case SCIM_ANTHY_COMMA_WIDE: return scim_anthy_kana_wide_comma_rule; - case SCIM_ANTHY_PERIOD_HALF: + case SCIM_ANTHY_COMMA_HALF: return scim_anthy_kana_half_comma_rule; - case SCIM_ANTHY_PERIOD_JAPANESE: + case SCIM_ANTHY_COMMA_JAPANESE: default: return scim_anthy_kana_ja_comma_rule; }; @@ -604,12 +604,12 @@ get_comma_rule (TypingMethod method, CommaStyle period) case SCIM_ANTHY_TYPING_METHOD_ROMAJI: default: - switch (period) { - case SCIM_ANTHY_PERIOD_WIDE: + switch (comma) { + case SCIM_ANTHY_COMMA_WIDE: return scim_anthy_romaji_wide_comma_rule; - case SCIM_ANTHY_PERIOD_HALF: + case SCIM_ANTHY_COMMA_HALF: return scim_anthy_romaji_half_comma_rule; - case SCIM_ANTHY_PERIOD_JAPANESE: + case SCIM_ANTHY_COMMA_JAPANESE: default: return scim_anthy_romaji_ja_comma_rule; }; diff --git a/src/scim_anthy_style_file.cpp b/src/scim_anthy_style_file.cpp index 1e8d9a7..95f4559 100755 --- a/src/scim_anthy_style_file.cpp +++ b/src/scim_anthy_style_file.cpp @@ -134,7 +134,7 @@ StyleLine::get_section (String §ion) spos < m_line.length () && isspace (m_line[spos]); spos++); for (epos = m_line.length () - 1; - epos >= 0 && isspace (m_line[epos]); + isspace (m_line[epos]); epos--); spos++; @@ -201,7 +201,7 @@ get_value_position (String &str) } } if (spos >= str.length ()) - return true; + return 1; else spos++; for (; |