From ab97fc0564b95efa4abc73a754dcc31b2d515b1f Mon Sep 17 00:00:00 2001 From: John Scipione Date: Mon, 30 Jun 2014 14:45:02 -0400 Subject: [PATCH] Replace FindFirst() == 0 with StartsWith() Thanks PulkoMandy. --- .../input_server/filters/shortcut_catcher/KeyCommandMap.cpp | 2 +- src/kits/tracker/DeskWindow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/input_server/filters/shortcut_catcher/KeyCommandMap.cpp b/src/add-ons/input_server/filters/shortcut_catcher/KeyCommandMap.cpp index 46dada23ac..cd4a149a4f 100644 --- a/src/add-ons/input_server/filters/shortcut_catcher/KeyCommandMap.cpp +++ b/src/add-ons/input_server/filters/shortcut_catcher/KeyCommandMap.cpp @@ -278,7 +278,7 @@ KeyCommandMap::MessageReceived(BMessage* message) bool foundAddOn = false; int32 count = paths.CountStrings(); for (int32 i = 0; i < count; i++) { - if (command.FindFirst(paths.StringAt(i)) == 0) { + if (command.StartsWith(paths.StringAt(i))) { foundAddOn = true; break; } diff --git a/src/kits/tracker/DeskWindow.cpp b/src/kits/tracker/DeskWindow.cpp index e38c9e489d..b6ba0c9dc1 100644 --- a/src/kits/tracker/DeskWindow.cpp +++ b/src/kits/tracker/DeskWindow.cpp @@ -326,7 +326,7 @@ BDeskWindow::ApplyShortcutPreferences(bool update) BPathFinder::FindPaths(B_FIND_PATH_ADD_ONS_DIRECTORY, "Tracker/", addOnPaths); for (int32 i = 0; i < addOnPaths.CountStrings(); i++) { - if (command.FindFirst(addOnPaths.StringAt(i)) == 0) { + if (command.StartsWith(addOnPaths.StringAt(i))) { isInAddons = true; break; }