Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50548 - trunk/libs/serialization/src
From: ramey_at_[hidden]
Date: 2009-01-12 01:24:04


Author: ramey
Date: 2009-01-12 01:24:03 EST (Mon, 12 Jan 2009)
New Revision: 50548
URL: http://svn.boost.org/trac/boost/changeset/50548

Log:
Make destruction of static objects even more bullet proof
Text files modified:
   trunk/libs/serialization/src/extended_type_info.cpp | 15 ++++++---------
   1 files changed, 6 insertions(+), 9 deletions(-)

Modified: trunk/libs/serialization/src/extended_type_info.cpp
==============================================================================
--- trunk/libs/serialization/src/extended_type_info.cpp (original)
+++ trunk/libs/serialization/src/extended_type_info.cpp 2009-01-12 01:24:03 EST (Mon, 12 Jan 2009)
@@ -92,12 +92,12 @@
         assert(start != end);
 
         // remove entry in map which corresponds to this type
- do{
- if(this == *start)
- x.erase(start++);
- else
- ++start;
- }while(start != end);
+ for(;start != end; ++start){
+ if(this == *start){
+ x.erase(start);
+ break;
+ }
+ }
     }
     m_key = NULL;
 }
@@ -120,9 +120,6 @@
     m_type_info_key(type_info_key),
     m_key(NULL)
 {
- // make sure that the ktmap is instantiated before
- // the first key is added to it.
- singleton<detail::ktmap>::get_const_instance();
 }
 
 BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY())


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk