mhoyt 2004/11/12 13:54:56
Modified: c/src/xalanc/PlatformSupport XalanMessageLoader.cpp
XalanMessageLoader.hpp
Log:
Remove unnecessary dynamic_cast
Revision Changes Path
1.7 +2 -7
xml-xalan/c/src/xalanc/PlatformSupport/XalanMessageLoader.cpp
Index: XalanMessageLoader.cpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanMessageLoader.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XalanMessageLoader.cpp 8 Nov 2004 18:11:05 -0000 1.6
+++ XalanMessageLoader.cpp 12 Nov 2004 21:54:56 -0000 1.7
@@ -83,13 +83,8 @@
void
XalanMessageLoader::terminate()
{
-#if defined (XALAN_INMEM_MSG_LOADER)
- typedef XalanMessageLoader::XalanMessageLoaderDestructFunct
<XalanInMemoryMessageLoader> LoaderDestructType;
-#elif defined (XALAN_ICU_MSG_LOADER)
- typedef XalanMessageLoader::XalanMessageLoaderDestructFunct
<XalanICUMessageLoader> LoaderDestructType;
-#elif defined (XALAN_NLS_MSG_LOADER)
- typedef XalanMessageLoader::XalanMessageLoaderDestructFunct
<XalanNLSMessageLoader> LoaderDestructType;
-#endif
+
+ typedef XalanMessageLoader::XalanMessageLoaderDestructFunct
LoaderDestructType;
assert(s_initManager != 0);
1.7 +4 -7
xml-xalan/c/src/xalanc/PlatformSupport/XalanMessageLoader.hpp
Index: XalanMessageLoader.hpp
===================================================================
RCS file:
/home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanMessageLoader.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XalanMessageLoader.hpp 8 Nov 2004 18:11:05 -0000 1.6
+++ XalanMessageLoader.hpp 12 Nov 2004 21:54:56 -0000 1.7
@@ -58,7 +58,6 @@
};
- template <class Type>
class XalanMessageLoaderDestructFunct
{
public:
@@ -67,13 +66,9 @@
{
assert ( p != 0);
- Type* theObj = dynamic_cast<Type*> (p);
-
- assert( theObj != 0 );
-
- theObj->~Type();
+ p->~XalanMessageLoader();
- theManager.deallocate(theObj);
+ theManager.deallocate(p);
}
};
@@ -128,6 +123,8 @@
const XalanDOMString& repText1,
const XalanDOMString& repText2,
const XalanDOMString& repText3);
+
+
protected:
virtual bool loadMsg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]