diff --git a/include/yaml-cpp/node/detail/impl.h b/include/yaml-cpp/node/detail/impl.h index e419827..69f4476 100644 --- a/include/yaml-cpp/node/detail/impl.h +++ b/include/yaml-cpp/node/detail/impl.h @@ -22,9 +22,9 @@ struct get_idx { }; template -struct get_idx< - Key, typename std::enable_if::value && - !std::is_same::value>::type> { +struct get_idx::value && + !std::is_same::value>::type> { static node* get(const std::vector& sequence, const Key& key, shared_memory_holder /* pMemory */) { return key < sequence.size() ? sequence[key] : 0; @@ -41,7 +41,7 @@ struct get_idx< }; template -struct get_idx::value >::type> { +struct get_idx::value>::type> { static node* get(const std::vector& sequence, const Key& key, shared_memory_holder pMemory) { return key >= 0 ? get_idx::get( diff --git a/include/yaml-cpp/node/detail/iterator.h b/include/yaml-cpp/node/detail/iterator.h index ac762ad..a859449 100644 --- a/include/yaml-cpp/node/detail/iterator.h +++ b/include/yaml-cpp/node/detail/iterator.h @@ -18,8 +18,8 @@ namespace detail { struct iterator_value; template -class iterator_base - : public std::iterator { +class iterator_base : public std::iterator { private: template @@ -46,10 +46,13 @@ class iterator_base template iterator_base(const iterator_base& rhs, typename std::enable_if::value, - enabler>::type = enabler()) + enabler>::type = enabler()) : m_iterator(rhs.m_iterator), m_pMemory(rhs.m_pMemory) {} - iterator_base& operator++() { ++m_iterator; return *this; } + iterator_base& operator++() { + ++m_iterator; + return *this; + } template bool operator==(const iterator_base& rhs) { @@ -70,9 +73,7 @@ class iterator_base return value_type(); } - proxy operator->() const { - return proxy(**this); - } + proxy operator->() const { return proxy(**this); } private: base_type m_iterator; diff --git a/include/yaml-cpp/node/detail/node.h b/include/yaml-cpp/node/detail/node.h index 5f26738..3154a52 100644 --- a/include/yaml-cpp/node/detail/node.h +++ b/include/yaml-cpp/node/detail/node.h @@ -66,9 +66,7 @@ class node { m_pRef->set_data(*rhs.m_pRef); } - void set_mark(const Mark& mark) { - m_pRef->set_mark(mark); - } + void set_mark(const Mark& mark) { m_pRef->set_mark(mark); } void set_type(NodeType::value type) { if (type != NodeType::Undefined) diff --git a/include/yaml-cpp/node/detail/node_iterator.h b/include/yaml-cpp/node/detail/node_iterator.h index fffe3d7..4734b6d 100644 --- a/include/yaml-cpp/node/detail/node_iterator.h +++ b/include/yaml-cpp/node/detail/node_iterator.h @@ -53,9 +53,9 @@ struct node_iterator_type { template class node_iterator_base - : public std::iterator< - std::forward_iterator_tag, node_iterator_value, - std::ptrdiff_t, node_iterator_value*, node_iterator_value > { + : public std::iterator, + std::ptrdiff_t, node_iterator_value*, + node_iterator_value > { private: struct enabler {}; @@ -90,7 +90,7 @@ class node_iterator_base template node_iterator_base(const node_iterator_base& rhs, typename std::enable_if::value, - enabler>::type = enabler()) + enabler>::type = enabler()) : m_type(rhs.m_type), m_seqIt(rhs.m_seqIt), m_mapIt(rhs.m_mapIt), @@ -117,7 +117,7 @@ class node_iterator_base template bool operator!=(const node_iterator_base& rhs) const { - return !(*this==rhs); + return !(*this == rhs); } node_iterator_base& operator++() { @@ -147,9 +147,7 @@ class node_iterator_base return value_type(); } - proxy operator->() const { - return proxy(**this); - } + proxy operator->() const { return proxy(**this); } MapIter increment_until_defined(MapIter it) { while (it != m_mapEnd && !is_defined(it)) diff --git a/src/node_data.cpp b/src/node_data.cpp index 46e1463..a862946 100644 --- a/src/node_data.cpp +++ b/src/node_data.cpp @@ -28,9 +28,7 @@ void node_data::mark_defined() { m_isDefined = true; } -void node_data::set_mark(const Mark& mark) { - m_mark = mark; -} +void node_data::set_mark(const Mark& mark) { m_mark = mark; } void node_data::set_type(NodeType::value type) { if (type == NodeType::Undefined) {