Skip to content

Commit 32cc1d9

Browse files
committed
add ResetUserDict()
Signed-off-by: shewer <[email protected]>
1 parent 8c293fc commit 32cc1d9

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/rime/algo/syllabifier.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Corrector;
2020
using SyllableId = int32_t;
2121

2222
struct EdgeProperties : SpellingProperties {
23-
EdgeProperties(SpellingProperties sup) : SpellingProperties(sup) {};
23+
EdgeProperties(SpellingProperties sup) : SpellingProperties(sup){};
2424
EdgeProperties() = default;
2525
bool is_correction = false;
2626
};

src/rime/gear/memory.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ Memory::~Memory() {
8686
unhandled_key_connection_.disconnect();
8787
}
8888

89+
void Memory::ResetUserDict() {
90+
user_dict_.reset();
91+
}
92+
8993
bool Memory::StartSession() {
9094
return user_dict_ && user_dict_->NewTransaction();
9195
}

src/rime/gear/memory.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class Memory {
4747
UserDictionary* user_dict() const { return user_dict_.get(); }
4848

4949
const Language* language() const { return language_.get(); }
50+
void ResetUserDict();
5051

5152
protected:
5253
void OnCommit(Context* ctx);

0 commit comments

Comments
 (0)