Replace FindFirst() == 0 with StartsWith()

Thanks PulkoMandy.
This commit is contained in:
John Scipione 2014-06-30 14:45:02 -04:00
parent c425d6cb85
commit ab97fc0564
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}