svn commit: r1150440 - in /xalan/c/trunk/src/xalanc: Include/STLHelper.hpp XPath/XObjectFactory.hpp XPath/XPathFactory.hpp

[email protected] Sun, 24 Jul 2011 17:27:51 -0000
Newsgroups gmane.text.xml.xalan.cvs
Message-ID <[email protected]>
Author: dbertoni
Date: Sun Jul 24 17:27:50 2011
New Revision: 1150440

URL: http://svn.apache.org/viewvc?rev=1150440&view=rev
Log:
Fixed return statements and return types of various template functions. Fixes XALANC-570.

Modified:
    xalan/c/trunk/src/xalanc/Include/STLHelper.hpp
    xalan/c/trunk/src/xalanc/XPath/XObjectFactory.hpp
    xalan/c/trunk/src/xalanc/XPath/XPathFactory.hpp

Modified: xalan/c/trunk/src/xalanc/Include/STLHelper.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Include/STLHelper.hpp?rev=1150440&r1=1150439&r2=1150440&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Include/STLHelper.hpp (original)
+++ xalan/c/trunk/src/xalanc/Include/STLHelper.hpp Sun Jul 24 17:27:50 2011
@@ -125,7 +125,7 @@ struct DeleteFunctor : public std::unary
     result_type
     operator()(argument_type    thePointer) const
     {
-        makeXalanDestroyFunctor(thePointer)(thePointer, m_memoryManager);
+        return makeXalanDestroyFunctor(thePointer)(thePointer, m_memoryManager);
     }
 
 private:
@@ -243,7 +243,7 @@ struct ClearFunctor : public std::unary_
     result_type
     operator()(argument_type&   theArg) const
     {
-        theArg.clear();
+        return theArg.clear();
     }
 };
 
@@ -282,7 +282,7 @@ struct MapValueDeleteFunctor : public st
     result_type
     operator()(argument_type    thePair) const
     {
-        makeXalanDestroyFunctor(thePair.second)(thePair.second, m_memoryManager);
+        return makeXalanDestroyFunctor(thePair.second)(thePair.second, m_memoryManager);
     }
 
 private:

Modified: xalan/c/trunk/src/xalanc/XPath/XObjectFactory.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XObjectFactory.hpp?rev=1150440&r1=1150439&r2=1150440&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XObjectFactory.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XObjectFactory.hpp Sun Jul 24 17:27:50 2011
@@ -241,7 +241,7 @@ public:
 #if defined(XALAN_NO_STD_NAMESPACE)
     struct DeleteXObjectFunctor : public unary_function<XObject*, void>
 #else
-    struct DeleteXObjectFunctor : public std::unary_function<XObject*, void>
+    struct DeleteXObjectFunctor : public std::unary_function<XObject*, bool>
 #endif
     {
     public:
@@ -259,13 +259,13 @@ public:
         {
             if (m_fInReset == true)
             {
-                m_factoryInstance.doReturnObject(
-                    theXObject,
-                    true);
+                return m_factoryInstance.doReturnObject(
+                        theXObject,
+                        true);
             }
             else
             {
-                m_factoryInstance.returnObject(theXObject);
+                return m_factoryInstance.returnObject(theXObject);
             }
         }
 

Modified: xalan/c/trunk/src/xalanc/XPath/XPathFactory.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XPathFactory.hpp?rev=1150440&r1=1150439&r2=1150440&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XPathFactory.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XPathFactory.hpp Sun Jul 24 17:27:50 2011
@@ -83,7 +83,7 @@ public:
 #if defined(XALAN_NO_STD_NAMESPACE)
     struct DeleteXPathFunctor : public unary_function<const XPath*, void>
 #else
-    struct DeleteXPathFunctor : public std::unary_function<const XPath*, void>
+    struct DeleteXPathFunctor : public std::unary_function<const XPath*, bool>
 #endif
     {
     public:
@@ -101,12 +101,12 @@ public:
         {
             if (m_fInReset == true)
             {
-                m_factoryInstance.doReturnObject(theXPath,
-                                                 true);
+                return m_factoryInstance.doReturnObject(theXPath,
+                                                        true);
             }
             else
             {
-                m_factoryInstance.returnObject(theXPath);
+                return m_factoryInstance.returnObject(theXPath);
             }
         }