mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-10 13:01:18 +00:00
Merged r444:449 from the node refactoring branch to the trunk
This commit is contained in:
@@ -4,18 +4,16 @@
|
||||
|
||||
namespace YAML
|
||||
{
|
||||
Iterator::Iterator(): m_pData(0)
|
||||
{
|
||||
m_pData = new IterPriv;
|
||||
}
|
||||
|
||||
Iterator::Iterator(IterPriv *pData): m_pData(pData)
|
||||
Iterator::Iterator(): m_pData(new IterPriv)
|
||||
{
|
||||
}
|
||||
|
||||
Iterator::Iterator(const Iterator& rhs): m_pData(0)
|
||||
Iterator::Iterator(std::auto_ptr<IterPriv> pData): m_pData(pData)
|
||||
{
|
||||
}
|
||||
|
||||
Iterator::Iterator(const Iterator& rhs): m_pData(new IterPriv(*rhs.m_pData))
|
||||
{
|
||||
m_pData = new IterPriv(*rhs.m_pData);
|
||||
}
|
||||
|
||||
Iterator& Iterator::operator = (const Iterator& rhs)
|
||||
@@ -23,14 +21,12 @@ namespace YAML
|
||||
if(this == &rhs)
|
||||
return *this;
|
||||
|
||||
delete m_pData;
|
||||
m_pData = new IterPriv(*rhs.m_pData);
|
||||
m_pData.reset(new IterPriv(*rhs.m_pData));
|
||||
return *this;
|
||||
}
|
||||
|
||||
Iterator::~Iterator()
|
||||
{
|
||||
delete m_pData;
|
||||
}
|
||||
|
||||
Iterator& Iterator::operator ++ ()
|
||||
|
Reference in New Issue
Block a user