summaryrefslogtreecommitdiff
path: root/external/hunspell/0001-cppcheck-redundant-c_str.patch
blob: 276ddd2e705b0fff35cc62d3dce42ccb07aa66de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 9a0baf202f67291eaf482f1bcf654e21d71943e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 23 Jan 2017 11:43:53 +0000
Subject: [PATCH] cppcheck: redundant c_str

---
 src/hunspell/suggestmgr.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx
index b998341..8d46dd6 100644
--- a/src/hunspell/suggestmgr.cxx
+++ b/src/hunspell/suggestmgr.cxx
@@ -1107,7 +1107,7 @@ void SuggestMgr::ngsuggest(std::vector<std::string>& wlst,
         int sc2;
         if (utf8) {
           w_f.clear();
-          u8_u16(w_f, f.c_str());
+          u8_u16(w_f, f);
           sc2 = ngram(3, w_word, w_f, NGRAM_LONGER_WORSE + low) +
                 leftcommonsubstring(w_word, w_f);
         } else {
@@ -1132,7 +1132,7 @@ void SuggestMgr::ngsuggest(std::vector<std::string>& wlst,
         std::string target2 = phonet(candidate, *ph);
         w_target2.clear();
         if (utf8) {
-          u8_u16(w_target2, target2.c_str());
+          u8_u16(w_target2, target2);
           scphon = 2 * ngram(3, w_target, w_target2,
                              NGRAM_LONGER_WORSE);
         } else {
-- 
2.9.3