Update repo to conform to openbmc code standard
Change-Id: If1d6b1f04514367cc544c2507a845b3e9d6d3435
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/mapbox/recursive_wrapper.hpp b/mapbox/recursive_wrapper.hpp
index 4ffcbd7..af569ef 100644
--- a/mapbox/recursive_wrapper.hpp
+++ b/mapbox/recursive_wrapper.hpp
@@ -15,11 +15,12 @@
#include <cassert>
#include <utility>
-namespace mapbox {
-namespace util {
+namespace mapbox
+{
+namespace util
+{
-template <typename T>
-class recursive_wrapper
+template <typename T> class recursive_wrapper
{
T* p_;
@@ -29,7 +30,7 @@
this->get() = rhs;
}
-public:
+ public:
using type = T;
/**
@@ -41,22 +42,32 @@
* of type T.
* @throws any exception thrown by the default constructur of T.
*/
- recursive_wrapper()
- : p_(new T){}
+ recursive_wrapper() : p_(new T)
+ {
+ }
- ~recursive_wrapper() noexcept { delete p_; }
+ ~recursive_wrapper() noexcept
+ {
+ delete p_;
+ }
- recursive_wrapper(recursive_wrapper const& operand)
- : p_(new T(operand.get())) {}
+ recursive_wrapper(recursive_wrapper const& operand) :
+ p_(new T(operand.get()))
+ {
+ }
- recursive_wrapper(T const& operand)
- : p_(new T(operand)) {}
+ recursive_wrapper(T const& operand) : p_(new T(operand))
+ {
+ }
- recursive_wrapper(recursive_wrapper&& operand)
- : p_(new T(std::move(operand.get()))) {}
+ recursive_wrapper(recursive_wrapper&& operand) :
+ p_(new T(std::move(operand.get())))
+ {
+ }
- recursive_wrapper(T&& operand)
- : p_(new T(std::move(operand))) {}
+ recursive_wrapper(T&& operand) : p_(new T(std::move(operand)))
+ {
+ }
inline recursive_wrapper& operator=(recursive_wrapper const& rhs)
{
@@ -101,13 +112,25 @@
return *get_pointer();
}
- T* get_pointer() { return p_; }
+ T* get_pointer()
+ {
+ return p_;
+ }
- const T* get_pointer() const { return p_; }
+ const T* get_pointer() const
+ {
+ return p_;
+ }
- operator T const&() const { return this->get(); }
+ operator T const&() const
+ {
+ return this->get();
+ }
- operator T&() { return this->get(); }
+ operator T&()
+ {
+ return this->get();
+ }
}; // class recursive_wrapper