dbertoni 00/05/05 08:09:08
Modified: c/src/XPath XObject.cpp
Log:
Fixed logic bugs in comparisons.
Revision Changes Path
1.5 +8 -8 xml-xalan/c/src/XPath/XObject.cpp
Index: XObject.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XObject.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XObject.cpp 2000/05/03 22:13:38 1.4
+++ XObject.cpp 2000/05/05 15:09:08 1.5
@@ -923,11 +923,11 @@
{
const eObjectType theRHSType = theRHS.getType();
- if (theLHSType == eTypeBoolean || theLHSType ==
eTypeBoolean)
+ if (theLHSType == eTypeBoolean || theRHSType ==
eTypeBoolean)
{
return boolean() == theRHS.boolean();
}
- else if (theLHSType == eTypeNumber || theLHSType ==
eTypeNumber)
+ else if (theLHSType == eTypeNumber || theRHSType ==
eTypeNumber)
{
return DoubleSupport::equal(num(),
theRHS.num());
}
@@ -972,11 +972,11 @@
{
const eObjectType theRHSType = theRHS.getType();
- if (theLHSType == eTypeBoolean || theLHSType ==
eTypeBoolean)
+ if (theLHSType == eTypeBoolean || theRHSType ==
eTypeBoolean)
{
return boolean() != theRHS.boolean();
}
- else if (theLHSType == eTypeNumber || theLHSType ==
eTypeNumber)
+ else if (theLHSType == eTypeNumber || theRHSType ==
eTypeNumber)
{
return DoubleSupport::notEqual(num(),
theRHS.num());
}
@@ -1011,7 +1011,7 @@
}
else if (theRHS.getType() == eTypeNodeSet)
{
- return greaterThanOrEqualNodeSet(theRHS, *this,
theLHSType, theRHS.getSupport());
+ return greaterThanNodeSet(theRHS, *this, theLHSType,
theRHS.getSupport());
}
else
{
@@ -1043,7 +1043,7 @@
}
else if (theRHS.getType() == eTypeNodeSet)
{
- return greaterThanNodeSet(theRHS, *this, theLHSType,
theRHS.getSupport());
+ return greaterThanOrEqualNodeSet(theRHS, *this,
theLHSType, theRHS.getSupport());
}
else
{
@@ -1075,7 +1075,7 @@
}
else if (theRHS.getType() == eTypeNodeSet)
{
- return lessThanOrEqualNodeSet(theRHS, *this,
theLHSType, theRHS.getSupport());
+ return lessThanNodeSet(theRHS, *this, theLHSType,
theRHS.getSupport());
}
else
{
@@ -1107,7 +1107,7 @@
}
else if (theRHS.getType() == eTypeNodeSet)
{
- return lessThanNodeSet(theRHS, *this, theLHSType,
theRHS.getSupport());
+ return lessThanOrEqualNodeSet(theRHS, *this,
theLHSType, theRHS.getSupport());
}
else
{