mirror of https://github.com/vitalif/grive2
fixed crash. missing AddRef()
parent
c00ffef6a3
commit
6ad573942a
|
@ -183,7 +183,7 @@ Node::iterator::iterator( ImplVec::iterator it ) : m_it( it )
|
||||||
|
|
||||||
Node::iterator::value_type Node::iterator::operator*() const
|
Node::iterator::value_type Node::iterator::operator*() const
|
||||||
{
|
{
|
||||||
return Node( *m_it ) ;
|
return Node( (*m_it)->AddRef() ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
Node::iterator Node::iterator::operator++()
|
Node::iterator Node::iterator::operator++()
|
||||||
|
|
|
@ -89,6 +89,7 @@ public :
|
||||||
ImplVec::iterator m_it ;
|
ImplVec::iterator m_it ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private :
|
private :
|
||||||
explicit Node( Impl *impl ) ;
|
explicit Node( Impl *impl ) ;
|
||||||
|
|
|
@ -61,7 +61,7 @@ void NodeTest::TestParseFile( )
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("q"), n["entry"]["link"]["@href"].Value() ) ;
|
CPPUNIT_ASSERT_EQUAL( std::string("q"), n["entry"]["link"]["@href"].Value() ) ;
|
||||||
CPPUNIT_ASSERT_EQUAL( Node::element, n["entry"]["link"]["href"].GetType() ) ;
|
CPPUNIT_ASSERT_EQUAL( Node::element, n["entry"]["link"]["href"].GetType() ) ;
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("abc"), n["entry"]["link"]["href"].Value() ) ;
|
CPPUNIT_ASSERT_EQUAL( std::string("abc"), n["entry"]["link"]["href"].Value() ) ;
|
||||||
/*
|
|
||||||
Node el = n["entry"]["link"] ;
|
Node el = n["entry"]["link"] ;
|
||||||
Node::iterator i = el.begin() ;
|
Node::iterator i = el.begin() ;
|
||||||
while ( i != el.end() )
|
while ( i != el.end() )
|
||||||
|
@ -69,7 +69,6 @@ void NodeTest::TestParseFile( )
|
||||||
CPPUNIT_ASSERT_EQUAL( std::string("href"), (*i).Name() ) ;
|
CPPUNIT_ASSERT_EQUAL( std::string("href"), (*i).Name() ) ;
|
||||||
++i ;
|
++i ;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end of namespace grut
|
} // end of namespace grut
|
||||||
|
|
Loading…
Reference in New Issue