diff --git a/src/crate/parse.cpp b/src/crate/parse.cpp index 4367c44..5700c89 100644 --- a/src/crate/parse.cpp +++ b/src/crate/parse.cpp @@ -49,7 +49,7 @@ Program parse(vector tlist) { } else if (load_type == "pack") { load_var.push_back(tok); load_type = "packid"; - } else if (find(id.begin(), id.end(), load_type) != -1) { + } else if (find(id.begin(), id.end(), load_type)) { load_var.clear(); load_type = ""; cout << "[" << tok.row << ", " << tok.col << "] unexpected id. (unexpected-id-with-" << load_type << ")\n"; @@ -70,7 +70,7 @@ Program parse(vector tlist) { } else if (load_type == "pack") { load_var.push_back(tok); load_type = "packct"; - } else if (find(id.begin(), id.end(), load_type) != -1) { + } else if (find(id.begin(), id.end(), load_type)) { load_var.clear(); load_type = ""; cout << "[" << tok.row << ", " << tok.col << "] unexpected const. (unexpected-const-with-" << load_type << ")\n"; @@ -85,7 +85,7 @@ Program parse(vector tlist) { if (load_type == "") { load_var.push_back(tok); load_type = "import"; - } else if (find(sky.begin(), sky.end(), load_type) != -1) { + } else if (find(sky.begin(), sky.end(), load_type)) { load_var.clear(); load_type = ""; cout << "[" << tok.row << ", " << tok.col << "] unexpected import. (unexpected-import-with-" << load_type << ")\n"; @@ -100,7 +100,7 @@ Program parse(vector tlist) { if (load_type == "") { load_var.push_back(tok); load_type = "pack"; - } else if (find(sky.begin(), sky.end(), load_type) != -1) { + } else if (find(sky.begin(), sky.end(), load_type)) { load_var.clear(); load_type = ""; cout << "[" << tok.row << ", " << tok.col << "] unexpected package. (unexpected-pack-with-" << load_type << ")\n";