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 2002/09/06 07:07:34 UTC
cvs commit: xml-xalan/c/src/XPath XPathFunctionTable.cpp XPathFunctionTable.hpp
dbertoni 2002/09/05 22:07:34
Modified: c/src/XPath XPathFunctionTable.cpp XPathFunctionTable.hpp
Log:
Reduced dynamic memory allocation in initialization.
Revision Changes Path
1.18 +2 -1 xml-xalan/c/src/XPath/XPathFunctionTable.cpp
Index: XPathFunctionTable.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathFunctionTable.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- XPathFunctionTable.cpp 5 Aug 2002 04:56:51 -0000 1.17
+++ XPathFunctionTable.cpp 6 Sep 2002 05:07:34 -0000 1.18
@@ -190,6 +190,8 @@
{
try
{
+ m_FunctionCollection.reserve(eDefaultTableSize);
+
InstallFunction(StaticStringToDOMString(XALAN_STATIC_UCODE_STRING("last")),
FunctionLast());
@@ -270,7 +272,6 @@
InstallFunction(StaticStringToDOMString(XALAN_STATIC_UCODE_STRING("round")),
FunctionRound());
-
}
catch(...)
{
1.16 +2 -0 xml-xalan/c/src/XPath/XPathFunctionTable.hpp
Index: XPathFunctionTable.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathFunctionTable.hpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- XPathFunctionTable.hpp 5 Aug 2002 04:56:51 -0000 1.15
+++ XPathFunctionTable.hpp 6 Sep 2002 05:07:34 -0000 1.16
@@ -127,6 +127,8 @@
typedef std::map<XalanDOMString, int> FunctionNameIndexMapType;
#endif
+ enum { eDefaultTableSize = 36 };
+
typedef DeleteFunctor<Function> DeleteFunctorType;
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org