From fc745a7afc5620ff0458693d52507ee1ab2504f2 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 6 Sep 2015 12:02:43 +0200 Subject: [PATCH] List.hpp: Fix code style --- src/include/containers/List.hpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/include/containers/List.hpp b/src/include/containers/List.hpp index 1906030abb..6046502e3f 100644 --- a/src/include/containers/List.hpp +++ b/src/include/containers/List.hpp @@ -43,31 +43,35 @@ template class __EXPORT ListNode { public: - ListNode() : _sibling(nullptr) { + ListNode() : _sibling(nullptr) + { } virtual ~ListNode() {}; void setSibling(T sibling) { _sibling = sibling; } T getSibling() { return _sibling; } - T get() { + T get() + { return _sibling; } protected: T _sibling; private: // forbid copy - ListNode(const ListNode& other); + ListNode(const ListNode &other); // forbid assignment - ListNode & operator = (const ListNode &); + ListNode &operator = (const ListNode &); }; template class __EXPORT List { public: - List() : _head() { + List() : _head() + { } virtual ~List() {}; - void add(T newNode) { + void add(T newNode) + { newNode->setSibling(getHead()); setHead(newNode); } @@ -77,7 +81,7 @@ protected: T _head; private: // forbid copy - List(const List& other); + List(const List &other); // forbid assignment - List& operator = (const List &); + List &operator = (const List &); };