summaryrefslogtreecommitdiff
path: root/external/hunspell/0001-cppcheck-redundant-c_str.patch
diff options
context:
space:
mode:
Diffstat (limited to 'external/hunspell/0001-cppcheck-redundant-c_str.patch')
-rw-r--r--external/hunspell/0001-cppcheck-redundant-c_str.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/external/hunspell/0001-cppcheck-redundant-c_str.patch b/external/hunspell/0001-cppcheck-redundant-c_str.patch
new file mode 100644
index 000000000000..276ddd2e705b
--- /dev/null
+++ b/external/hunspell/0001-cppcheck-redundant-c_str.patch
@@ -0,0 +1,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
+