Skip to content

Commit

Permalink
DictTrie: removed unused var
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyiwu committed Sep 21, 2024
1 parent dbebc7c commit cc58d4f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/cppjieba/DictTrie.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,12 @@ class DictTrie {

void LoadUserDict(const string& filePaths) {
vector<string> files = limonp::Split(filePaths, "|;");
size_t lineno = 0;
for (size_t i = 0; i < files.size(); i++) {
ifstream ifs(files[i].c_str());
XCHECK(ifs.is_open()) << "open " << files[i] << " failed";
string line;

for (; getline(ifs, line); lineno++) {
while(getline(ifs, line)) {
if (line.size() == 0) {
continue;
}
Expand Down Expand Up @@ -214,7 +213,7 @@ class DictTrie {
vector<string> buf;

DictUnit node_info;
for (size_t lineno = 0; getline(ifs, line); lineno++) {
while (getline(ifs, line)) {
Split(line, buf, " ");
XCHECK(buf.size() == DICT_COLUMN_NUM) << "split result illegal, line:" << line;
MakeNodeInfo(node_info,
Expand Down

0 comments on commit cc58d4f

Please sign in to comment.