From 22b073d41fb677ebe56994a1587f6caabea84441 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Fri, 20 Jun 2014 19:23:06 -0400 Subject: [PATCH] Tracker: style fixes to TrackerString --- src/kits/tracker/TrackerString.cpp | 23 ++++++++++++++--------- src/kits/tracker/TrackerString.h | 1 + 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/kits/tracker/TrackerString.cpp b/src/kits/tracker/TrackerString.cpp index 201c449069..2b80acb27b 100644 --- a/src/kits/tracker/TrackerString.cpp +++ b/src/kits/tracker/TrackerString.cpp @@ -37,25 +37,32 @@ All rights reserved. #include #include + +// #pragma mark - TrackerString + + TrackerString::TrackerString() { } TrackerString::TrackerString(const char* string) - : BString(string) + : + BString(string) { } TrackerString::TrackerString(const TrackerString &string) - : BString(string) + : + BString(string) { } TrackerString::TrackerString(const char* string, int32 maxLength) - : BString(string, maxLength) + : + BString(string, maxLength) { } @@ -191,7 +198,7 @@ TrackerString::FindFirst(const BString &string, int32 fromOffset) const int32 TrackerString::FindFirst(const char* string, int32 fromOffset) const { - if (!string) + if (string == NULL) return -1; int32 length = Length(); @@ -263,7 +270,7 @@ TrackerString::FindLast(const BString &string, int32 beforeOffset) const int32 TrackerString::FindLast(const char* string, int32 beforeOffset) const { - if (!string) + if (string == NULL) return -1; int32 length = Length(); @@ -336,7 +343,7 @@ TrackerString::IFindFirst(const BString &string, int32 fromOffset) const int32 TrackerString::IFindFirst(const char* string, int32 fromOffset) const { - if (!string) + if (string == NULL) return -1; int32 length = Length(); @@ -392,7 +399,7 @@ TrackerString::IFindLast(const BString &string, int32 beforeOffset) const int32 TrackerString::IFindLast(const char* string, int32 beforeOffset) const { - if (!string) + if (string == NULL) return -1; int32 length = Length(); @@ -519,7 +526,6 @@ TrackerString::StringMatchesPattern(const char* string, const char* pattern, string++; if (IsInsideGlyph(string[0])) string = MoveToEndOfGlyph(string); - break; case '*': @@ -635,7 +641,6 @@ TrackerString::StringMatchesPattern(const char* string, const char* pattern, string = sStorage[patternLevel]; } else return false; - break; } } diff --git a/src/kits/tracker/TrackerString.h b/src/kits/tracker/TrackerString.h index be9929f3a3..d53f8b006b 100644 --- a/src/kits/tracker/TrackerString.h +++ b/src/kits/tracker/TrackerString.h @@ -158,4 +158,5 @@ TrackerString::CharsAreEqual(char char1, char char2, using namespace BPrivate; + #endif // _TRACKER_STRING_H