]> granicus.if.org Git - icu/commitdiff
ICU-13194 RBBI safe table, fix C++ typos found during Java port.
authorAndy Heninger <andy.heninger@gmail.com>
Fri, 30 Mar 2018 01:14:59 +0000 (01:14 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Fri, 30 Mar 2018 01:14:59 +0000 (01:14 +0000)
X-SVN-Rev: 41173

icu4c/source/common/rbbitblb.cpp
icu4c/source/common/rbbitblb.h

index 2a2e7132bc9352acfa7c65a1e9d43a0afb0b0cd5..beb4dc584230f73397bf637c6a624bb4394af0a4 100644 (file)
@@ -57,8 +57,8 @@ RBBITableBuilder::~RBBITableBuilder() {
 
 //-----------------------------------------------------------------------------
 //
-//   RBBITableBuilder::build  -  This is the main function for building the DFA state transtion
-//                               table from the RBBI rules parse tree.
+//   RBBITableBuilder::buildForwardTable  -  This is the main function for building
+//                               the DFA state transition table from the RBBI rules parse tree.
 //
 //-----------------------------------------------------------------------------
 void  RBBITableBuilder::buildForwardTable() {
@@ -1221,9 +1221,9 @@ void RBBITableBuilder::removeSafeState(int32_t keepState, int32_t duplState) {
     fSafeTable->removeElementAt(duplState);   // Note that fSafeTable has a deleter function
                                               // and will auto-delete the removed element.
     int32_t numStates = fSafeTable->size();
-    int32_t numCols = fRB->fSetBuilder->getNumCharCategories();
     for (int32_t state=0; state<numStates; ++state) {
         UnicodeString *sd = (UnicodeString *)fSafeTable->elementAt(state);
+        int32_t numCols = sd->length();
         for (int32_t col=0; col<numCols; col++) {
             int32_t existingVal = sd->charAt(col);
             int32_t newVal = existingVal;
index 9ab1942fb3037d1ac7c904b8372179d5696d4722..0a0326ae32fd6a0e6468765d828225ba58db6c0b 100644 (file)
@@ -145,7 +145,7 @@ public:
     #define  printPosSets(n)
     #define  printStates()
     #define  printRuleStatusTable()
-    #define printSafeTable()
+    #define  printReverseTable()
 #endif
 
 private: