mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1269941 - Upgrade to Hunspell 1.4.1. r=ehsan
This commit is contained in:
parent
174671db1d
commit
0ddefc4583
@ -1,2 +1,2 @@
|
||||
Hunspell Version: 1.4.0
|
||||
Hunspell Version: 1.4.1
|
||||
Additional Patches: See patches directory.
|
||||
|
@ -2783,7 +2783,7 @@ class is_any_of {
|
||||
bool operator()(char c) { return chars.find(c) != std::string::npos; }
|
||||
|
||||
private:
|
||||
const std::string& chars;
|
||||
std::string chars;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1088,10 +1088,10 @@ int SuggestMgr::movechar(char** wlst,
|
||||
std::copy(word, word + candidate.size(), candidate.begin());
|
||||
}
|
||||
|
||||
for (std::string::iterator p = candidate.begin() + candidate.size() - 1; p > candidate.begin(); --p) {
|
||||
for (std::string::iterator q = p - 1; q >= candidate.begin() && std::distance(q, p) < 10; --q) {
|
||||
std::swap(*q, *(q + 1));
|
||||
if (std::distance(q, p) < 2)
|
||||
for (std::string::reverse_iterator p = candidate.rbegin(), pEnd = candidate.rend() - 1; p != pEnd; ++p) {
|
||||
for (std::string::reverse_iterator q = p + 1, qEnd = candidate.rend(); q != qEnd && std::distance(p, q) < 10; ++q) {
|
||||
std::swap(*q, *(q - 1));
|
||||
if (std::distance(p, q) < 2)
|
||||
continue; // omit swap char
|
||||
ns = testsug(wlst, candidate.c_str(), candidate.size(), ns, cpdsuggest, NULL, NULL);
|
||||
if (ns == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user