diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2017-03-16 07:38:32 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-03-16 07:38:32 +0000 |
| commit | 6258cfee90ff442bf2774d8a5eea3fc00cdc638b (patch) | |
| tree | 56bf3a2cf7d1393270f685dbb32683fcc8ced8b2 /libutils/include | |
| parent | bd46cd9ef64ee48babe8e7816c489e875ae4556c (diff) | |
| parent | fc3f57acbb11455bc917f9e622c526c01c3843ff (diff) | |
| download | system_core-6258cfee90ff442bf2774d8a5eea3fc00cdc638b.tar.gz system_core-6258cfee90ff442bf2774d8a5eea3fc00cdc638b.tar.bz2 system_core-6258cfee90ff442bf2774d8a5eea3fc00cdc638b.zip | |
Merge "Formatting changes for TypeHelpers.h and Vectors.h"
Diffstat (limited to 'libutils/include')
| -rw-r--r-- | libutils/include/utils/TypeHelpers.h | 10 | ||||
| -rw-r--r-- | libutils/include/utils/Vector.h | 36 |
2 files changed, 23 insertions, 23 deletions
diff --git a/libutils/include/utils/TypeHelpers.h b/libutils/include/utils/TypeHelpers.h index 2a2522722..28fbca508 100644 --- a/libutils/include/utils/TypeHelpers.h +++ b/libutils/include/utils/TypeHelpers.h @@ -36,7 +36,7 @@ template <typename T> struct trait_trivial_ctor { enum { value = false }; }; template <typename T> struct trait_trivial_dtor { enum { value = false }; }; template <typename T> struct trait_trivial_copy { enum { value = false }; }; template <typename T> struct trait_trivial_move { enum { value = false }; }; -template <typename T> struct trait_pointer { enum { value = false }; }; +template <typename T> struct trait_pointer { enum { value = false }; }; template <typename T> struct trait_pointer<T*> { enum { value = true }; }; template <typename TYPE> @@ -59,13 +59,13 @@ template <typename T, typename U> struct aggregate_traits { enum { is_pointer = false, - has_trivial_ctor = + has_trivial_ctor = traits<T>::has_trivial_ctor && traits<U>::has_trivial_ctor, - has_trivial_dtor = + has_trivial_dtor = traits<T>::has_trivial_dtor && traits<U>::has_trivial_dtor, - has_trivial_copy = + has_trivial_copy = traits<T>::has_trivial_copy && traits<U>::has_trivial_copy, - has_trivial_move = + has_trivial_move = traits<T>::has_trivial_move && traits<U>::has_trivial_move }; }; diff --git a/libutils/include/utils/Vector.h b/libutils/include/utils/Vector.h index 9a643f9b0..3189fd623 100644 --- a/libutils/include/utils/Vector.h +++ b/libutils/include/utils/Vector.h @@ -42,11 +42,11 @@ class Vector : private VectorImpl { public: typedef TYPE value_type; - - /*! + + /*! * Constructors and destructors */ - + Vector(); Vector(const Vector<TYPE>& rhs); explicit Vector(const SortedVector<TYPE>& rhs); @@ -54,7 +54,7 @@ public: /*! copy operator */ const Vector<TYPE>& operator = (const Vector<TYPE>& rhs) const; - Vector<TYPE>& operator = (const Vector<TYPE>& rhs); + Vector<TYPE>& operator = (const Vector<TYPE>& rhs); const Vector<TYPE>& operator = (const SortedVector<TYPE>& rhs) const; Vector<TYPE>& operator = (const SortedVector<TYPE>& rhs); @@ -65,7 +65,7 @@ public: inline void clear() { VectorImpl::clear(); } - /*! + /*! * vector stats */ @@ -87,13 +87,13 @@ public: /*! * C-style array access */ - - //! read-only C-style access + + //! read-only C-style access inline const TYPE* array() const; //! read-write C-style access TYPE* editArray(); - - /*! + + /*! * accessors */ @@ -113,10 +113,10 @@ public: //! grants right access to the top of the stack (last element) TYPE& editTop(); - /*! + /*! * append/insert another vector */ - + //! insert another vector at a given index ssize_t insertVectorAt(const Vector<TYPE>& vector, size_t index); @@ -130,10 +130,10 @@ public: //! append an array at the end of this vector ssize_t appendArray(const TYPE* array, size_t length); - /*! + /*! * add/insert/replace items */ - + //! insert one or several items initialized with their default constructor inline ssize_t insertAt(size_t index, size_t numItems = 1); //! insert one or several items initialized from a prototype item @@ -147,7 +147,7 @@ public: //! same as push() but returns the index the item was added at (or an error) inline ssize_t add(); //! same as push() but returns the index the item was added at (or an error) - ssize_t add(const TYPE& item); + ssize_t add(const TYPE& item); //! replace an item with a new one initialized with its default constructor inline ssize_t replaceAt(size_t index); //! replace an item with a new one @@ -165,10 +165,10 @@ public: /*! * sort (stable) the array */ - + typedef int (*compar_t)(const TYPE* lhs, const TYPE* rhs); typedef int (*compar_r_t)(const TYPE* lhs, const TYPE* rhs, void* state); - + inline status_t sort(compar_t cmp); inline status_t sort(compar_r_t cmp, void* state); @@ -237,7 +237,7 @@ Vector<TYPE>::~Vector() { template<class TYPE> inline Vector<TYPE>& Vector<TYPE>::operator = (const Vector<TYPE>& rhs) { VectorImpl::operator = (rhs); - return *this; + return *this; } template<class TYPE> inline @@ -255,7 +255,7 @@ Vector<TYPE>& Vector<TYPE>::operator = (const SortedVector<TYPE>& rhs) { template<class TYPE> inline const Vector<TYPE>& Vector<TYPE>::operator = (const SortedVector<TYPE>& rhs) const { VectorImpl::operator = (rhs); - return *this; + return *this; } template<class TYPE> inline |
