]> granicus.if.org Git - icu/commitdiff
ICU-10286 warning fix
authorSteven R. Loomis <srl@icu-project.org>
Thu, 6 Mar 2014 21:59:38 +0000 (21:59 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Thu, 6 Mar 2014 21:59:38 +0000 (21:59 +0000)
X-SVN-Rev: 35369

icu4c/source/i18n/filteredbrk.cpp

index 8d6ce28ca15884b58c4f6ab3125a578add7be2f1..85b0b0c99c22d880a63369bc9d59b38bf7977e69 100644 (file)
@@ -21,7 +21,6 @@ U_NAMESPACE_BEGIN
 
 using namespace std;
 
-static const UBool debug = FALSE;
 static const int32_t kPARTIAL = (1<<0); //< partial - need to run through forward trie
 static const int32_t kMATCH   = (1<<1); //< exact match - skip this one.
 static const int32_t kSuppressInReverse = (1<<0);
@@ -261,14 +260,17 @@ SimpleFilteredBreakIteratorBuilder::SimpleFilteredBreakIteratorBuilder()
 UBool
 SimpleFilteredBreakIteratorBuilder::suppressBreakAfter(const UnicodeString& exception, UErrorCode& status)
 {
+  if( U_FAILURE(status) ) return FALSE;
   return fSet.insert(exception).second;
 }
 
 UBool
 SimpleFilteredBreakIteratorBuilder::unsuppressBreakAfter(const UnicodeString& exception, UErrorCode& status)
 {
+  if( U_FAILURE(status) ) return FALSE;
   return ((fSet.erase(exception)) != 0);
 }
+
 BreakIterator *
 SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UErrorCode& status) {
   LocalPointer<BreakIterator> adopt(adoptBreakIterator);