Skip to content

Commit

Permalink
add ResetUserDict()
Browse files Browse the repository at this point in the history
Signed-off-by: shewer <[email protected]>
  • Loading branch information
shewer committed Jun 20, 2024
1 parent 8c293fc commit 32cc1d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/rime/algo/syllabifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Corrector;
using SyllableId = int32_t;

struct EdgeProperties : SpellingProperties {
EdgeProperties(SpellingProperties sup) : SpellingProperties(sup) {};
EdgeProperties(SpellingProperties sup) : SpellingProperties(sup){};
EdgeProperties() = default;
bool is_correction = false;
};
Expand Down
4 changes: 4 additions & 0 deletions src/rime/gear/memory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ Memory::~Memory() {
unhandled_key_connection_.disconnect();
}

void Memory::ResetUserDict() {
user_dict_.reset();
}

bool Memory::StartSession() {
return user_dict_ && user_dict_->NewTransaction();
}
Expand Down
1 change: 1 addition & 0 deletions src/rime/gear/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Memory {
UserDictionary* user_dict() const { return user_dict_.get(); }

const Language* language() const { return language_.get(); }
void ResetUserDict();

protected:
void OnCommit(Context* ctx);
Expand Down

0 comments on commit 32cc1d9

Please sign in to comment.