You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2004/08/06 03:15:25 UTC
cvs commit: xml-xalan/c/src/xalanc/Include HPUXDefinitions.hpp XalanVector.hpp
dbertoni 2004/08/05 18:15:25
Modified: c/src/xalanc/Include HPUXDefinitions.hpp XalanVector.hpp
Log:
Fixed problem with old definition of distance.
Revision Changes Path
1.9 +1 -0 xml-xalan/c/src/xalanc/Include/HPUXDefinitions.hpp
Index: HPUXDefinitions.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/Include/HPUXDefinitions.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- HPUXDefinitions.hpp 5 Aug 2004 23:32:32 -0000 1.8
+++ HPUXDefinitions.hpp 6 Aug 2004 01:15:25 -0000 1.9
@@ -32,6 +32,7 @@
#if defined(_HP_NAMESPACE_STD)
#define XALAN_HAS_STD_ITERATORS
+#define XALAN_HAS_STD_DISTANCE
#else
#if defined(RWSTD_MULTI_THREAD) && !defined(__HPACC_THREAD_SAFE_RB_TREE)
#define __HPACC_THREAD_SAFE_RB_TREE
1.4 +22 -5 xml-xalan/c/src/xalanc/Include/XalanVector.hpp
Index: XalanVector.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/Include/XalanVector.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XalanVector.hpp 5 Aug 2004 23:32:02 -0000 1.3
+++ XalanVector.hpp 6 Aug 2004 01:15:25 -0000 1.4
@@ -204,7 +204,7 @@
end(),
theFirst);
- shrinkCount(XALAN_STD_QUALIFIER distance(theFirst, theLast));
+ shrinkCount(local_distance(theFirst, theLast));
}
invariants();
@@ -227,7 +227,7 @@
invariants();
const size_type theInsertSize =
- XALAN_STD_QUALIFIER distance(theStart, theEnd);
+ local_distance(theStart, theEnd);
if (theInsertSize == 0)
{
@@ -272,7 +272,7 @@
const iterator theOriginalEnd = end();
const size_type theRightSplitSize =
- XALAN_STD_QUALIFIER distance(thePosition, end());
+ local_distance(thePosition, theOriginalEnd);
if (theRightSplitSize <= theInsertSize)
{
@@ -384,8 +384,9 @@
{
// insert into the middle of the vector that has enough capacity
const iterator theOriginalEnd = end();
+
const size_type theRightSplitSize =
- XALAN_STD_QUALIFIER distance(thePosition, end());
+ local_distance(thePosition, theOriginalEnd);
if (theRightSplitSize <= theCount)
{
@@ -452,7 +453,7 @@
else
{
const size_type theDistance =
- XALAN_STD_QUALIFIER distance(begin(), thePosition);
+ local_distance(begin(), thePosition);
insert(thePosition, 1, theData);
@@ -821,6 +822,22 @@
assert(m_data == 0 && m_allocation == 0 || m_data != 0 && m_allocation != 0);
}
#endif
+
+ size_type
+ local_distance(
+ const_iterator theStart,
+ const_iterator theEnd)
+ {
+#if defined(XALAN_HAS_STD_DISTANCE)
+ return XALAN_STD_QUALIFIER distance(theStart, theEnd);
+#else
+ size_type theDistance;
+
+ XALAN_STD_QUALIFIER distance(theStart, theEnd, theDistance);
+
+ return theDistance;
+#endif
+ }
value_type*
allocate(size_type size)
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org