ICU-4092 Remove dead code to improve code coverage numbers.

X-SVN-Rev: 16993
This commit is contained in:
George Rhoten 2004-12-22 00:23:15 +00:00
parent aff473ea00
commit 2f83fa1b86
4 changed files with 17 additions and 9 deletions

View File

@ -837,9 +837,11 @@ continueOn:
// Leave the iterator at our result position.
fText->setIndex(result);
if (fTrace) {
RBBIDebugPrintf("result = %d\n\n", result);
}
#ifdef RBBI_DEBUG
if (fTrace) {
RBBIDebugPrintf("result = %d\n\n", result);
}
#endif
return result;
}

View File

@ -200,7 +200,7 @@ struct RBBISetTableEl {
#define RBBIDebugPrintf printf
#define RBBIDebugPuts puts
#else
inline void RBBIDebugPrintf(...) {}
#undef RBBIDebugPrintf
#define RBBIDebugPuts(arg)
#endif

View File

@ -302,7 +302,9 @@ UBool RBBIRuleScanner::doParseActions(EParseAction action)
if (U_FAILURE(*fRB->fStatus)) { // parse tree rooted in TOS node.
break;
}
#ifdef RBBI_DEBUG
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "rtree")) {printNodeStack("end of rule");}
#endif
U_ASSERT(fNodeStackPtr == 1);
// If this rule includes a look-ahead '/', add a endMark node to the
@ -939,7 +941,9 @@ void RBBIRuleScanner::parse() {
#endif
for (;;) {
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "scan")) { RBBIDebugPrintf(".");}
#ifdef RBBI_DEBUG
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "scan")) { RBBIDebugPrintf(".");}
#endif
if (tableEl->fCharClass < 127 && fC.fEscaped == FALSE && tableEl->fCharClass == fC.fChar) {
// Table row specified an individual character, not a set, and
// the input character is not escaped, and
@ -978,7 +982,7 @@ void RBBIRuleScanner::parse() {
// No match on this row, advance to the next row for this state,
tableEl++;
}
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "scan")) { RBBIDebugPrintf("\n");}
if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "scan")) { RBBIDebugPuts("");}
//
// We've found the row of the state table that matches the current input
@ -1062,8 +1066,6 @@ void RBBIRuleScanner::parse() {
//
//---------------------------------------------------------------------------------
#ifdef RBBI_DEBUG
void RBBIRuleScanner::printNodeStack(const char *) {}
#else
void RBBIRuleScanner::printNodeStack(const char *title) {
int i;
RBBIDebugPrintf("%s. Dumping node stack...\n", title);
@ -1130,7 +1132,9 @@ void RBBIRuleScanner::scanSet() {
if (U_FAILURE(localStatus)) {
// TODO: Get more accurate position of the error from UnicodeSet's return info.
// UnicodeSet appears to not be reporting correctly at this time.
RBBIDebugPrintf("UnicodeSet parse postion.ErrorIndex = %d\n", pos.getIndex());
#ifdef RBBI_DEBUG
RBBIDebugPrintf("UnicodeSet parse postion.ErrorIndex = %d\n", pos.getIndex());
#endif
error(localStatus);
delete uset;
return;

View File

@ -88,7 +88,9 @@ private:
void findSetFor(const UnicodeString &s, RBBINode *node, UnicodeSet *setToAdopt = NULL);
UChar32 nextCharLL();
#ifdef RBBI_DEBUG
void printNodeStack(const char *title);
#endif
RBBINode *pushNewNode(RBBINode::NodeType t);
void scanSet();