diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/freestyle/intern/view_map/AutoPtrHelper.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/freestyle/intern/view_map/AutoPtrHelper.h')
-rw-r--r-- | source/blender/freestyle/intern/view_map/AutoPtrHelper.h | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/source/blender/freestyle/intern/view_map/AutoPtrHelper.h b/source/blender/freestyle/intern/view_map/AutoPtrHelper.h index 2554d303b08..9da109ab2a6 100644 --- a/source/blender/freestyle/intern/view_map/AutoPtrHelper.h +++ b/source/blender/freestyle/intern/view_map/AutoPtrHelper.h @@ -27,28 +27,36 @@ namespace Freestyle { #if __cplusplus > 199711L -template<typename T> -class AutoPtr : public std::unique_ptr<T> { -public: - AutoPtr() : std::unique_ptr<T>() {} - AutoPtr(T *ptr) : std::unique_ptr<T>(ptr) {} - - /* TODO(sergey): Is there more clear way to do this? */ - template<typename X> - AutoPtr(AutoPtr<X>& other) : std::unique_ptr<T>(other.get()) { - other.release(); - } +template<typename T> class AutoPtr : public std::unique_ptr<T> { + public: + AutoPtr() : std::unique_ptr<T>() + { + } + AutoPtr(T *ptr) : std::unique_ptr<T>(ptr) + { + } + + /* TODO(sergey): Is there more clear way to do this? */ + template<typename X> AutoPtr(AutoPtr<X> &other) : std::unique_ptr<T>(other.get()) + { + other.release(); + } }; #else -template<typename T> -class AutoPtr : public std::auto_ptr<T> { -public: - AutoPtr() : std::auto_ptr<T>() {} - AutoPtr(T *ptr) : std::auto_ptr<T>(ptr) {} - AutoPtr(std::auto_ptr_ref<T> ref) : std::auto_ptr<T>(ref) {} +template<typename T> class AutoPtr : public std::auto_ptr<T> { + public: + AutoPtr() : std::auto_ptr<T>() + { + } + AutoPtr(T *ptr) : std::auto_ptr<T>(ptr) + { + } + AutoPtr(std::auto_ptr_ref<T> ref) : std::auto_ptr<T>(ref) + { + } }; #endif -} /* namespace Freestyle */ +} /* namespace Freestyle */ #endif // __FREESTYLE_AUTOPTR_HELPER_H__ |