Added Node::clear() function

This commit is contained in:
Jesse Beder
2012-11-08 18:47:22 -06:00
parent eb02dd8dc3
commit bcdda4027f
3 changed files with 17 additions and 1 deletions

View File

@@ -15,7 +15,7 @@
namespace YAML
{
inline Node::Node(): m_pNode(0)
inline Node::Node(): m_pNode(NULL)
{
}
@@ -168,6 +168,11 @@ namespace YAML
return *this;
}
inline void Node::clear()
{
m_pNode = NULL;
}
template<typename T>
inline void Node::Assign(const T& rhs)
{

View File

@@ -56,6 +56,7 @@ namespace YAML
bool is(const Node& rhs) const;
template<typename T> Node& operator=(const T& rhs);
Node& operator=(const Node& rhs);
void clear();
// size/iterator
std::size_t size() const;