[Libreoffice-commits] .: 2 commits - cppu/source

Fridrich Strba fridrich at kemper.freedesktop.org
Sun Feb 6 02:49:35 PST 2011


 cppu/source/uno/EnvStack.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit efe11c97df61a7740717665524b176a80977e77f
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Sun Feb 6 11:49:10 2011 +0100

    don't crash trying to erase one past end

diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx
index c96d307..b5fa3e3 100644
--- a/cppu/source/uno/EnvStack.cxx
+++ b/cppu/source/uno/EnvStack.cxx
@@ -88,10 +88,7 @@ static void s_setCurrent(uno_Environment * pEnv)
         rThreadMap[threadId] = pEnv;
 
     else
-    {
-        ThreadMap::iterator iEnv = rThreadMap.find(threadId);
-        rThreadMap.erase(iEnv);
-    }
+        rThreadMap.erase(threadId);
 }
 
 static uno_Environment * s_getCurrent(void)
commit d330f2eb0e10beb06a7ba070444f12ead1bb30c7
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Sun Feb 6 11:47:56 2011 +0100

    Revert "revert this change for now as its triggering a crash in saxparser"
    
    This reverts commit b73cf2b1ef3892b4c200c05fd617bfd099aceee5.

diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx
index 99322eb..c96d307 100644
--- a/cppu/source/uno/EnvStack.cxx
+++ b/cppu/source/uno/EnvStack.cxx
@@ -36,7 +36,7 @@
 #include "osl/thread.h"
 #include "osl/mutex.hxx"
 
-#include <hash_map>
+#include <boost/unordered_map.hpp>
 
 
 using namespace com::sun::star;
@@ -65,7 +65,7 @@ size_t oslThreadIdentifier_hash::operator()(oslThreadIdentifier s1) const
     return s1;
 }
 
-typedef ::std::hash_map<oslThreadIdentifier,
+typedef ::boost::unordered_map<oslThreadIdentifier,
                         uno_Environment *,
                         oslThreadIdentifier_hash,
                         oslThreadIdentifier_equal>  ThreadMap;


More information about the Libreoffice-commits mailing list