Skip to content

Commit 1a4a990

Browse files
committed
update schemas_ type
1 parent c44bcde commit 1a4a990

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/rimeengine.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class RimeEngine final : public InputMethodEngineV2 {
184184

185185
FCITX_ADDON_DEPENDENCY_LOADER(notifications, instance_->addonManager());
186186

187-
std::unordered_set<std::string> schemas_;
187+
std::vector<std::string> schemas_;
188188
std::list<SimpleAction> schemActions_;
189189
std::unordered_map<std::string,
190190
std::list<std::unique_ptr<RimeOptionAction>>>

src/rimestate.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,11 @@ void RimeState::switchNextSchema() {
135135
return;
136136
}
137137
targetSchemaId = *schemas.begin();
138-
if (schemas.count(currentSchemaId)) {
139-
auto it = schemas.find(currentSchemaId);
138+
auto it = schemas.find(currentSchemaId);
139+
if (it != schemas.end()) {
140+
++it;
140141
if (it != schemas.end()) {
141-
++it;
142-
if (it != schemas.end()) {
143-
targetSchemaId = *it;
144-
}
142+
targetSchemaId = *it;
145143
}
146144
}
147145
if (targetSchemaId.empty()) {

0 commit comments

Comments
 (0)