MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / ReadUserDictionary

Method ReadUserDictionary

src/spellchecker_hunspell.cpp:83–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void HunspellSpellChecker::ReadUserDictionary() {
84 customWords.clear();
85
86 // Read the old contents of the user's dictionary
87 try {
88 auto stream = agi::io::Open(userDicPath);
89 copy_if(
90 ++agi::line_iterator<std::string>(*stream), agi::line_iterator<std::string>(),
91 inserter(customWords, customWords.end()),
92 [](auto const& str) { return !str.empty(); });
93 }
94 catch (agi::fs::FileNotFound const&) {
95 // Not an error; user dictionary just doesn't exist
96 }
97}
98
99void HunspellSpellChecker::WriteUserDictionary() {
100 // Ensure that the path exists

Callers

nothing calls this directly

Calls 3

OpenFunction · 0.85
clearMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected