From 8c3de3b7cb399352248ab076454b1bc8281f8f0a Mon Sep 17 00:00:00 2001
From: jpbl <jpbl>
Date: Mon, 29 Aug 2005 14:40:16 +0000
Subject: [PATCH] updated the utilspp version

---
 utilspp/functor/Functor.inl       |  5 ++---
 utilspp/functor/MemFunHandler.hpp | 10 ++++++----
 utilspp/singleton/Makefile.am     | 18 ++++++++++--------
 3 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/utilspp/functor/Functor.inl b/utilspp/functor/Functor.inl
index 9534aada18..f996ce814e 100644
--- a/utilspp/functor/Functor.inl
+++ b/utilspp/functor/Functor.inl
@@ -38,15 +38,14 @@ utilspp::Functor<R, TList>::Functor(const PointerToObj &obj, MemFun fun)
 
 template <typename R, class TList>
 utilspp::Functor<R, TList>::Functor(const Functor &functor)
-: mImpl(functor->mImpl->clone())
+: mImpl(functor.mImpl->clone())
 {}
 
 template <typename R, class TList>
 utilspp::Functor<R, TList> &
 utilspp::Functor<R, TList>::operator=(const Functor &functor)
 {
-  delete(mImpl);
-  mImpl = functor->clone();
+  mImpl = std::auto_ptr< Impl >(functor.mImpl->clone());
   return (*this);
 }
 
diff --git a/utilspp/functor/MemFunHandler.hpp b/utilspp/functor/MemFunHandler.hpp
index 567e8a7154..2e92cee85b 100644
--- a/utilspp/functor/MemFunHandler.hpp
+++ b/utilspp/functor/MemFunHandler.hpp
@@ -32,15 +32,15 @@ namespace utilspp
   {
   public:
     typedef typename ParentFunctor::ResultType ResultType;
-    MemFunHandler(const PointerToObj& obj, PointerToMemFn memFn) 
+    MemFunHandler(PointerToObj obj, PointerToMemFn memFn) 
       : mObj(obj)
       , mMemFn(memFn)
     {}
 
     MemFunHandler* clone() const
     {return new MemFunHandler(*this);}
-
-        ResultType operator()()
+    
+    ResultType operator()()
     {return ((*mObj).*mMemFn)();}
 
     ResultType operator()(typename ParentFunctor::Parm1 p1)
@@ -49,7 +49,9 @@ namespace utilspp
     ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2)
     {return ((*mObj).*mMemFn)(p1, p2);}
 
-    ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3)
+    ResultType operator()(typename ParentFunctor::Parm1 p1, 
+			  typename ParentFunctor::Parm2 p2, 
+			  typename ParentFunctor::Parm3 p3)
     {return ((*mObj).*mMemFn)(p1, p2, p3);}
 
     ResultType operator()(typename ParentFunctor::Parm1 p1, typename ParentFunctor::Parm2 p2, typename ParentFunctor::Parm3 p3, typename ParentFunctor::Parm4 p4)
diff --git a/utilspp/singleton/Makefile.am b/utilspp/singleton/Makefile.am
index 4992bcdb08..8534960846 100644
--- a/utilspp/singleton/Makefile.am
+++ b/utilspp/singleton/Makefile.am
@@ -1,18 +1,19 @@
 noinst_LTLIBRARIES = libsingleton.la
 
 libsingleton_la_SOURCES = \
-	CreationStatic.hpp \
-	CreationUsingNew.hpp \
-	LifetimeDefault.hpp \
+	CreationStatic.hpp CreationStatic.inl \
+	CreationUsingNew.hpp CreationUsingNew.inl \
+	LifetimeDefault.hpp LifetimeDefault.inl \
 	LifetimeLibrary.cpp LifetimeLibrary.hpp LifetimeLibrary.inl \
 	LifetimeWithLongevity.hpp LifetimeWithLongevity.inl \
 	PrivateMembers.cpp PrivateMembers.hpp PrivateMembers.inl \
-	SingletonHolder.hpp SingletonHolder.inl
+	SingletonHolder.hpp SingletonHolder.inl 
+
 
-pkginclude_HEADERS =  \
-	CreationStatic.hpp \
-	CreationUsingNew.hpp \
-	LifetimeDefault.hpp \
+pkginclude_HEADERS = \
+	CreationStatic.hpp CreationStatic.inl \
+	CreationUsingNew.hpp CreationUsingNew.inl \
+	LifetimeDefault.hpp LifetimeDefault.inl \
 	LifetimeLibrary.hpp LifetimeLibrary.inl \
 	LifetimeWithLongevity.hpp LifetimeWithLongevity.inl \
 	PrivateMembers.hpp PrivateMembers.inl \
@@ -20,3 +21,4 @@ pkginclude_HEADERS =  \
 
 pkgincludedir=$(includedir)/utilspp/singleton
 
+
-- 
GitLab