From cabcbfbca7c1fa2c5c9190e740a6b87da5d65b9f Mon Sep 17 00:00:00 2001
From: PeiYong Zhang <peiyongz@apache.org>
Date: Tue, 13 Aug 2002 17:07:43 +0000
Subject: [PATCH] using 2 instead of 1.25 to expand capacity

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@174117 13f79535-47bb-0310-9956-ffa450edef68
---
 src/xercesc/framework/XMLBuffer.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/xercesc/framework/XMLBuffer.cpp b/src/xercesc/framework/XMLBuffer.cpp
index 361f4ad85..982fc7536 100644
--- a/src/xercesc/framework/XMLBuffer.cpp
+++ b/src/xercesc/framework/XMLBuffer.cpp
@@ -56,8 +56,11 @@
 
 /**
  * $Log$
- * Revision 1.1  2002/02/01 22:21:50  peiyongz
- * Initial revision
+ * Revision 1.2  2002/08/13 17:07:43  peiyongz
+ * using 2 instead of 1.25 to expand capacity
+ *
+ * Revision 1.1.1.1  2002/02/01 22:21:50  peiyongz
+ * sane_include
  *
  * Revision 1.5  2000/08/17 00:04:50  andyh
  * Fix error in growing of XMLBuffer from within ensureCapacity()
@@ -142,7 +145,7 @@ void XMLBuffer::insureCapacity(const unsigned int extraNeeded)
         return;
 
     // Oops, not enough room. Calc new capacity and allocate new buffer
-    const unsigned int newCap = (unsigned int)((fIndex + extraNeeded) * 1.25);
+    const unsigned int newCap = (unsigned int)((fIndex + extraNeeded) * 2);
     XMLCh* newBuf = new XMLCh[newCap+1];
 
     // Copy over the old stuff
-- 
GitLab