Author: borisk
Date: Tue Jul 15 04:14:49 2008
New Revision: 676873
URL: http://svn.apache.org/viewvc?rev=676873&view=rev
Log:
Use signed char instead of unsigned int since we only need to represent three
values: 0, 1, and -1.
Modified:
xerces/c/trunk/src/xercesc/validators/common/DFAContentModel.cpp
Modified: xerces/c/trunk/src/xercesc/validators/common/DFAContentModel.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/common/DFAContentModel.cpp?rev=676873&r1=676872&r2=676873&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/common/DFAContentModel.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/common/DFAContentModel.cpp Tue Jul 15
04:14:49 2008
@@ -1339,20 +1339,20 @@
}
// Unique Particle Attribution
- // store the conflict results between any two elements in fElemMap
- // XMLContentModel::gInvalidTrans: not compared; 0: no conflict; 1:
conflict
- unsigned int** conflictTable = (unsigned int**) fMemoryManager->allocate
+ // Store the conflict results between any two elements in fElemMap
+ // 0 - not yet tested, 1 - conflict, (-1) - no conflict
+ signed char** conflictTable = (signed char**) fMemoryManager->allocate
(
- fElemMapSize * sizeof(unsigned int*)
+ fElemMapSize * sizeof(signed char*)
);
// initialize the conflict table
for (j = 0; j < fElemMapSize; j++) {
- conflictTable[j] = (unsigned int*) fMemoryManager->allocate
+ conflictTable[j] = (signed char*) fMemoryManager->allocate
(
- fElemMapSize * sizeof(unsigned int)
+ fElemMapSize * sizeof(signed char)
);
- memset(conflictTable[j], 0, fElemMapSize*sizeof(unsigned int));
+ memset(conflictTable[j], 0, fElemMapSize*sizeof(signed char));
}
// for each state, check whether it has overlap transitions
@@ -1383,7 +1383,7 @@
if (o != 0 &&
((fTransTable[i][j] == i) ^ (fTransTable[i][k]
== i)) &&
o->minOccurs == o->maxOccurs) {
- conflictTable[j][k] =
XMLContentModel::gInvalidTrans;
+ conflictTable[j][k] = -1;
continue;
}
}
@@ -1413,7 +1413,7 @@
buf2.getRawBuffer());
}
else
- conflictTable[j][k] = XMLContentModel::gInvalidTrans;
+ conflictTable[j][k] = -1;
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]