mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
DictTrie: removed unused var
This commit is contained in:
parent
dbebc7cacb
commit
cc58d4f858
@ -149,13 +149,12 @@ class DictTrie {
|
|||||||
|
|
||||||
void LoadUserDict(const string& filePaths) {
|
void LoadUserDict(const string& filePaths) {
|
||||||
vector<string> files = limonp::Split(filePaths, "|;");
|
vector<string> files = limonp::Split(filePaths, "|;");
|
||||||
size_t lineno = 0;
|
|
||||||
for (size_t i = 0; i < files.size(); i++) {
|
for (size_t i = 0; i < files.size(); i++) {
|
||||||
ifstream ifs(files[i].c_str());
|
ifstream ifs(files[i].c_str());
|
||||||
XCHECK(ifs.is_open()) << "open " << files[i] << " failed";
|
XCHECK(ifs.is_open()) << "open " << files[i] << " failed";
|
||||||
string line;
|
string line;
|
||||||
|
|
||||||
for (; getline(ifs, line); lineno++) {
|
while(getline(ifs, line)) {
|
||||||
if (line.size() == 0) {
|
if (line.size() == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -214,7 +213,7 @@ class DictTrie {
|
|||||||
vector<string> buf;
|
vector<string> buf;
|
||||||
|
|
||||||
DictUnit node_info;
|
DictUnit node_info;
|
||||||
for (size_t lineno = 0; getline(ifs, line); lineno++) {
|
while (getline(ifs, line)) {
|
||||||
Split(line, buf, " ");
|
Split(line, buf, " ");
|
||||||
XCHECK(buf.size() == DICT_COLUMN_NUM) << "split result illegal, line:" << line;
|
XCHECK(buf.size() == DICT_COLUMN_NUM) << "split result illegal, line:" << line;
|
||||||
MakeNodeInfo(node_info,
|
MakeNodeInfo(node_info,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user