Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / external / hunspell / 0004-either-clear-will-be-called-anyway-before-use-or-its.patch
blob6c8a108d67197e4ee1a8230df3e6747fafe506f8
1 From aab258adbd9c78931a36b96e58975a08000249a8 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3 Date: Fri, 10 Feb 2017 17:14:35 +0000
4 Subject: [PATCH 4/4] either clear will be called anyway before use, or its
5 unused afterwards
7 ---
8 src/hunspell/suggestmgr.cxx | 8 --------
9 1 file changed, 8 deletions(-)
11 diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx
12 index ea52707..ae34535 100644
13 --- a/src/hunspell/suggestmgr.cxx
14 +++ b/src/hunspell/suggestmgr.cxx
15 @@ -1089,7 +1089,6 @@ void SuggestMgr::ngsuggest(std::vector<std::string>& wlst,
16 continue;
18 if (utf8) {
19 - w_f.clear();
20 u8_u16(w_f, HENTRY_WORD(hp));
22 int leftcommon = leftcommonsubstring(w_word, w_f);
23 @@ -1115,7 +1114,6 @@ void SuggestMgr::ngsuggest(std::vector<std::string>& wlst,
24 copy_field(f, HENTRY_DATA(hp), MORPH_PHON)) {
25 int sc2;
26 if (utf8) {
27 - w_f.clear();
28 u8_u16(w_f, f);
30 int leftcommon = leftcommonsubstring(w_word, w_f);
31 @@ -1139,7 +1137,6 @@ void SuggestMgr::ngsuggest(std::vector<std::string>& wlst,
32 int scphon = -20000;
33 if (ph && (sc > 2) && (abs(n - (int)hp->clen) <= 3)) {
34 if (utf8) {
35 - w_candidate.clear();
36 u8_u16(w_candidate, HENTRY_WORD(hp));
37 mkallcap_utf(w_candidate, langnum);
38 u16_u8(candidate, w_candidate);
39 @@ -1148,7 +1145,6 @@ void SuggestMgr::ngsuggest(std::vector<std::string>& wlst,
40 mkallcap(candidate, csconv);
42 f = phonet(candidate, *ph);
43 - w_f.clear();
44 if (utf8) {
45 u8_u16(w_f, f);
46 scphon = 2 * ngram(3, w_target, w_f,
47 @@ -1254,7 +1250,6 @@ void SuggestMgr::ngsuggest(std::vector<std::string>& wlst,
49 for (int k = 0; k < nw; k++) {
50 if (utf8) {
51 - w_f.clear();
52 u8_u16(w_f, glst[k].word);
54 int leftcommon = leftcommonsubstring(w_word, w_f);
55 @@ -1335,7 +1330,6 @@ void SuggestMgr::ngsuggest(std::vector<std::string>& wlst,
56 std::string gl;
57 int len;
58 if (utf8) {
59 - w_gl.clear();
60 len = u8_u16(w_gl, guess[i]);
61 mkallsmall_utf(w_gl, langnum);
62 u16_u8(gl, w_gl);
63 @@ -1355,7 +1349,6 @@ void SuggestMgr::ngsuggest(std::vector<std::string>& wlst,
65 // using 2-gram instead of 3, and other weightening
67 - w_gl.clear();
68 if (utf8) {
69 u8_u16(w_gl, gl);
70 //w_gl is lowercase already at this point
71 @@ -1421,7 +1414,6 @@ void SuggestMgr::ngsuggest(std::vector<std::string>& wlst,
72 // lowering rootphon[i]
73 std::string gl;
74 int len;
75 - w_gl.clear();
76 if (utf8) {
77 len = u8_u16(w_gl, rootsphon[i]);
78 mkallsmall_utf(w_gl, langnum);
79 --
80 2.9.3