Trim trailing spaces.

This commit is contained in:
Andrey Semashev
2022-01-13 17:32:11 +03:00
parent 75ba1a50c9
commit d175ba2450
7 changed files with 29 additions and 29 deletions

View File

@ -24,7 +24,7 @@ struct node_base
virtual void print(std::ostream& s) const = 0;
virtual void double_me() = 0;
void append(node_base* p)
{
if (m_next)
@ -32,7 +32,7 @@ struct node_base
else
m_next = p;
}
private:
node_base* m_next;
};
@ -52,9 +52,9 @@ struct node : node_base
void print(std::ostream& s) const { s << this->m_value; }
void double_me() { m_value += m_value; }
private:
T m_value;
};
#endif // NODE_DWA2004110_HPP

View File

@ -28,10 +28,10 @@ class node_iterator
void increment()
{ m_node = m_node->next(); }
bool equal(node_iterator const& other) const
{ return this->m_node == other.m_node; }
node_base& dereference() const
{ return *m_node; }

View File

@ -38,15 +38,15 @@ class node_iter
boost::is_convertible<OtherValue*,Value*>
, enabler
>::type = enabler()
# endif
# endif
)
: m_node(other.m_node) {}
# if !BOOST_WORKAROUND(__GNUC__, == 2)
private: // GCC2 can't grant friendship to template member functions
private: // GCC2 can't grant friendship to template member functions
friend class boost::iterator_core_access;
# endif
# endif
template <class OtherValue>
bool equal(node_iter<OtherValue> const& other) const
@ -63,7 +63,7 @@ class node_iter
# else
private:
template <class> friend class node_iter;
# endif
# endif
Value* m_node;
};

View File

@ -27,7 +27,7 @@ class node_iter
typedef boost::iterator_adaptor<
node_iter<Value>, Value*, boost::use_default, boost::forward_traversal_tag
> super_t;
public:
node_iter()
: super_t(0) {}
@ -43,14 +43,14 @@ class node_iter
boost::is_convertible<OtherValue*,Value*>
, enabler
>::type = enabler()
# endif
# endif
)
: super_t(other.base()) {}
# if !BOOST_WORKAROUND(__GNUC__, == 2)
private: // GCC2 can't grant friendship to template member functions
private: // GCC2 can't grant friendship to template member functions
friend class boost::iterator_core_access;
# endif
# endif
void increment() { this->base_reference() = this->base()->next(); }
};