Ticket #3957: patchfile.patch

File patchfile.patch, 2.2 KB (added by Carus V. (Bud) Clarke <carus.v.clarke@…>, 13 years ago)

Patch file

  • libs/serialization/src/shared_ptr_helper.cpp

    old new  
    6666    collection_type::iterator i = m_pointers->find(sp);
    6767
    6868    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;
    7476    }
    7577    od = void_upcast(
    7678        *true_type,
     
    9294    );
    9395}
    9496
     97BOOST_ARCHIVE_DECL(void)
     98shared_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
    95113//  #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP
    96114BOOST_ARCHIVE_DECL(void)
    97115shared_ptr_helper::append(const boost_132::shared_ptr<const void> & t){