From a427d69d76ce465f0412aa0861fabdbde0fe3136 Mon Sep 17 00:00:00 2001 From: mvji <33432858+mvji@users.noreply.github.com> Date: Tue, 19 Apr 2022 20:46:03 +0200 Subject: [PATCH] UI/importers: Fix compiler warning Fix comparison of integers of different signs. Use string::npos instead of -1 --- UI/importers/sl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/importers/sl.cpp b/UI/importers/sl.cpp index c7606ec7c..26c260a64 100644 --- a/UI/importers/sl.cpp +++ b/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); }