Fix ifs that were always true

This commit is contained in:
araml
2017-03-06 12:14:15 -03:00
parent d317cb9e71
commit 2006c5dc60

View File

@@ -130,7 +130,7 @@ namespace alpr
size_t found; size_t found;
found=file_path.find_last_of("/\\"); found=file_path.find_last_of("/\\");
if (found >= 0) if (found != std::string::npos)
return file_path.substr(found+1); return file_path.substr(found+1);
return ""; return "";
@@ -146,7 +146,7 @@ namespace alpr
found=file_path.find_last_of("/\\"); found=file_path.find_last_of("/\\");
if (found >= 0) if (found != std::string::npos)
return file_path.substr(0,found); return file_path.substr(0,found);
return ""; return "";