Преглед на файлове

UI/importers: Fix compiler warning

Fix comparison of integers of different signs.
Use string::npos instead of -1
mvji преди 3 години
родител
ревизия
a427d69d76
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      UI/importers/sl.cpp

+ 1 - 1
UI/importers/sl.cpp

@@ -522,7 +522,7 @@ OBSImporterFiles SLImporter::FindFiles()
 
 		size_t pos = name.find_last_of(".json");
 		size_t end_pos = name.size() - 1;
-		if (pos != -1 && pos == end_pos) {
+		if (pos != string::npos && pos == end_pos) {
 			string str = dst + name;
 			res.push_back(str);
 		}