Ticket #3957: patchfile-2.patch
File patchfile-2.patch, 2.7 KB (added by , 13 years ago) |
---|
-
libs/serialization/src/shared_ptr_helper.cpp
old new 66 66 collection_type::iterator i = m_pointers->find(sp); 67 67 68 68 if(i == m_pointers->end()){ 69 std::pair<collection_type::iterator, bool> result; 70 shared_ptr<const void> sp(const_cast<void * >(od), void_deleter(true_type)); 71 result = m_pointers->insert(sp); 72 assert(result.second); 73 i = result.first; 69 // temp: std::pair<collection_type::iterator, bool> result; 70 // temp: shared_ptr<const void> sp(const_cast<void * >(od), void_deleter(true_type)); 71 // temp: result = m_pointers->insert(sp); 72 // temp: assert(result.second); 73 // temp: i = result.first; 74 shared_ptr<void> np; 75 return np; 74 76 } 75 77 od = void_upcast( 76 78 *true_type, … … 92 94 ); 93 95 } 94 96 97 BOOST_ARCHIVE_DECL(void) 98 shared_ptr_helper::append(const boost::shared_ptr<const void> &sp){ 99 100 // make tracking array if necessary 101 if(NULL == m_pointers) 102 m_pointers = new collection_type; 103 104 collection_type::iterator i = m_pointers->find(sp); 105 106 if(i == m_pointers->end()){ 107 std::pair<collection_type::iterator, bool> result; 108 result = m_pointers->insert(sp); 109 assert(result.second); 110 } 111 } 112 95 113 // #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP 96 114 BOOST_ARCHIVE_DECL(void) 97 115 shared_ptr_helper::append(const boost_132::shared_ptr<const void> & t){ -
boost/archive/shared_ptr_helper.hpp
old new 121 121 const boost::serialization::extended_type_info * this_type 122 122 ); 123 123 124 BOOST_ARCHIVE_DECL(void) 125 append(const boost::shared_ptr<const void> &); 126 124 127 template<class T> 125 128 struct non_polymorphic { 126 129 static const boost::serialization::extended_type_info * … … 179 182 this_type 180 183 ); 181 184 182 s = shared_ptr<T>( 183 r, 184 static_cast<T *>(r.get()) 185 ); 185 if (!r) 186 { 187 s.reset(t); 188 const void * od = void_downcast( 189 *true_type, 190 *this_type, 191 static_cast<const void *>(t) 192 ); 193 shared_ptr<const void> sp(s, od); 194 append(sp); 195 } 196 else 197 { 198 s = shared_ptr<T>( 199 r, 200 static_cast<T *>(r.get()) 201 ); 202 } 186 203 187 204 //s = static_pointer_cast<T,void>( 188 205 // const_pointer_cast<void, const void>(*r)