Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 679901 Details for
Bug 761999
app-i18n/librime-1.5.3-r1: fails to build with >=app-i18n/opencc-1.1.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for opencc 1.1.0+ type change
beae5b1d4e990aeb05eb86db5eefec50fa03750b.patch (text/plain), 2.89 KB, created by
Andrew Udvare
on 2020-12-27 21:16:01 UTC
(
hide
)
Description:
patch for opencc 1.1.0+ type change
Filename:
MIME Type:
Creator:
Andrew Udvare
Created:
2020-12-27 21:16:01 UTC
Size:
2.89 KB
patch
obsolete
>From beae5b1d4e990aeb05eb86db5eefec50fa03750b Mon Sep 17 00:00:00 2001 >From: Chen Gong <chen.sst@gmail.com> >Date: Fri, 15 May 2020 01:42:52 +0800 >Subject: [PATCH] fix(simplifier): opencc::DictEntry::Values() type change in > opencc 1.1.0 > >Closes #367 >--- > src/rime/gear/simplifier.cc | 14 ++++++-------- > src/rime/gear/simplifier.h | 5 +++-- > 2 files changed, 9 insertions(+), 10 deletions(-) > >diff --git a/src/rime/gear/simplifier.cc b/src/rime/gear/simplifier.cc >index 98a1c5a9..feb7f50b 100644 >--- a/src/rime/gear/simplifier.cc >+++ b/src/rime/gear/simplifier.cc >@@ -8,6 +8,7 @@ > #include <boost/filesystem.hpp> > #include <stdint.h> > #include <utf8.h> >+#include <utility> > #include <rime/candidate.h> > #include <rime/common.h> > #include <rime/config.h> >@@ -45,8 +46,7 @@ class Opencc { > } > } > >- bool ConvertWord(const string& text, >- vector<string>* forms) { >+ bool ConvertWord(const string& text, vector<string>* forms) { > if (dict_ == nullptr) return false; > opencc::Optional<const opencc::DictEntry*> item = dict_->Match(text); > if (item.IsNull()) { >@@ -54,15 +54,14 @@ class Opencc { > return false; > } else { > const opencc::DictEntry* entry = item.Get(); >- for (const char* value : entry->Values()) { >- forms->push_back(value); >+ for (auto&& value : entry->Values()) { >+ forms->push_back(std::move(value)); > } > return forms->size() > 0; > } > } > >- bool RandomConvertText(const string& text, >- string* simplified) { >+ bool RandomConvertText(const string& text, string* simplified) { > if (dict_ == nullptr) return false; > const char *phrase = text.c_str(); > std::ostringstream buffer; >@@ -83,8 +82,7 @@ class Opencc { > return *simplified != text; > } > >- bool ConvertText(const string& text, >- string* simplified) { >+ bool ConvertText(const string& text, string* simplified) { > if (converter_ == nullptr) return false; > *simplified = converter_->Convert(text); > return *simplified != text; >diff --git a/src/rime/gear/simplifier.h b/src/rime/gear/simplifier.h >index c68e4c7d..f70344e7 100644 >--- a/src/rime/gear/simplifier.h >+++ b/src/rime/gear/simplifier.h >@@ -20,7 +20,7 @@ class Simplifier : public Filter, TagMatching { > explicit Simplifier(const Ticket& ticket); > > virtual an<Translation> Apply(an<Translation> translation, >- CandidateList* candidates); >+ CandidateList* candidates); > > > virtual bool AppliesToSegment(Segment* segment) { >@@ -35,7 +35,8 @@ class Simplifier : public Filter, TagMatching { > > void Initialize(); > void PushBack(const an<Candidate>& original, >- CandidateQueue* result, const string& simplified); >+ CandidateQueue* result, >+ const string& simplified); > > bool initialized_ = false; > the<Opencc> opencc_;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 761999
: 679901