From 58cdd43a57e55533ce07f64c593b01b47bb7903c Mon Sep 17 00:00:00 2001 From: Jae-Seong Lee-Russo Date: Wed, 30 Dec 2009 18:27:30 -0500 Subject: [PATCH] Bug 530374 - Replace PR_MIN/PR_MAX with NS_MIN/NS_MAX in xslt, r=jonas --- content/xslt/src/base/txDouble.cpp | 2 +- content/xslt/src/base/txStringUtils.cpp | 2 +- content/xslt/src/xpath/txMozillaXPathTreeWalker.cpp | 2 +- content/xslt/src/xpath/txNodeSet.cpp | 2 +- content/xslt/src/xslt/txMozillaXMLOutput.cpp | 2 +- content/xul/content/src/nsXULElement.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/content/xslt/src/base/txDouble.cpp b/content/xslt/src/base/txDouble.cpp index 06a3b59690d5..b4b252fead51 100644 --- a/content/xslt/src/base/txDouble.cpp +++ b/content/xslt/src/base/txDouble.cpp @@ -265,7 +265,7 @@ void Double::toString(double aValue, nsAString& aDest) } } // mantissa - int firstlen = PR_MIN(intDigits, endp - buf); + int firstlen = NS_MIN(intDigits, endp - buf); for (i = 0; i < firstlen; i++) { *dest = buf[i]; ++dest; } diff --git a/content/xslt/src/base/txStringUtils.cpp b/content/xslt/src/base/txStringUtils.cpp index 5714017814fb..a9553d60fcb7 100644 --- a/content/xslt/src/base/txStringUtils.cpp +++ b/content/xslt/src/base/txStringUtils.cpp @@ -121,7 +121,7 @@ public: void write(const PRUnichar* aSource, PRUint32 aSourceLength) { - PRUint32 len = PR_MIN(PRUint32(mIter.size_forward()), aSourceLength); + PRUint32 len = NS_MIN(PRUint32(mIter.size_forward()), aSourceLength); PRUnichar* cp = mIter.get(); const PRUnichar* end = aSource + len; while (aSource != end) { diff --git a/content/xslt/src/xpath/txMozillaXPathTreeWalker.cpp b/content/xslt/src/xpath/txMozillaXPathTreeWalker.cpp index ad2320abbaa7..ce0d3871d5ea 100644 --- a/content/xslt/src/xpath/txMozillaXPathTreeWalker.cpp +++ b/content/xslt/src/xpath/txMozillaXPathTreeWalker.cpp @@ -722,7 +722,7 @@ txXPathNodeUtils::comparePosition(const txXPathNode& aNode, PRInt32 otherTotal = otherParents.Length() - 1; NS_ASSERTION(total != otherTotal, "Can't have same number of parents"); - PRInt32 lastIndex = PR_MIN(total, otherTotal); + PRInt32 lastIndex = NS_MIN(total, otherTotal); PRInt32 i; parent = nsnull; for (i = 0; i <= lastIndex; ++i) { diff --git a/content/xslt/src/xpath/txNodeSet.cpp b/content/xslt/src/xpath/txNodeSet.cpp index e67baffdc64a..d45a2f68c8e1 100644 --- a/content/xslt/src/xpath/txNodeSet.cpp +++ b/content/xslt/src/xpath/txNodeSet.cpp @@ -552,7 +552,7 @@ PRBool txNodeSet::ensureGrowSize(PRInt32 aSize) // This isn't 100% safe. But until someone manages to make a 1gig nodeset // it should be ok. - PRInt32 newLength = PR_MAX(oldLength, kTxNodeSetMinSize); + PRInt32 newLength = NS_MAX(oldLength, kTxNodeSetMinSize); while (newLength < ensureSize) { newLength *= kTxNodeSetGrowFactor; diff --git a/content/xslt/src/xslt/txMozillaXMLOutput.cpp b/content/xslt/src/xslt/txMozillaXMLOutput.cpp index 76c70f2272e1..25b6e5728e37 100644 --- a/content/xslt/src/xslt/txMozillaXMLOutput.cpp +++ b/content/xslt/src/xslt/txMozillaXMLOutput.cpp @@ -660,7 +660,7 @@ txMozillaXMLOutput::createTxWrapper() // The new documentElement should go after the document type. // This is needed for cases when there is no existing // documentElement in the document. - rootLocation = PR_MAX(rootLocation, j + 1); + rootLocation = NS_MAX(rootLocation, j + 1); #endif ++j; } diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index 158cfc376ae6..a6697374b500 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -984,7 +984,7 @@ nsXULElement::RemoveChildAt(PRUint32 aIndex, PRBool aNotify, PRBool aMutationEve PRInt32 treeRows; listBox->GetRowCount(&treeRows); if (treeRows > 0) { - newCurrentIndex = PR_MIN((treeRows - 1), newCurrentIndex); + newCurrentIndex = NS_MIN((treeRows - 1), newCurrentIndex); nsCOMPtr newCurrentItem; listBox->GetItemAtIndex(newCurrentIndex, getter_AddRefs(newCurrentItem)); nsCOMPtr xulCurItem = do_QueryInterface(newCurrentItem);