From bb04a59026f0cc3d13b20a7cad0aa864476c2593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkovsky@mmg.fjfi.cvut.cz> Date: Tue, 3 Sep 2019 15:52:03 +0200 Subject: [PATCH] Style changes in StaticArray --- src/TNL/Containers/Algorithms/StaticArrayAssignment.h | 8 ++++---- src/TNL/Containers/StaticArray.h | 8 ++++---- src/UnitTests/Containers/StaticArrayTest.cpp | 1 - 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/TNL/Containers/Algorithms/StaticArrayAssignment.h b/src/TNL/Containers/Algorithms/StaticArrayAssignment.h index d7fff0ffe4..32a59e98c5 100644 --- a/src/TNL/Containers/Algorithms/StaticArrayAssignment.h +++ b/src/TNL/Containers/Algorithms/StaticArrayAssignment.h @@ -52,10 +52,10 @@ template< typename StaticArray, struct StaticArrayAssignment< StaticArray, T, true > { __cuda_callable__ - static void assign( StaticArray& a, const T& t ) + static void assign( StaticArray& a, const T& v ) { static_assert( StaticArray::getSize() == T::getSize(), "Cannot assign static arrays with different size." ); - StaticFor< 0, StaticArray::getSize() >::exec( detail::AssignArrayFunctor{}, a.getData(), t ); + StaticFor< 0, StaticArray::getSize() >::exec( detail::AssignArrayFunctor{}, a.getData(), v ); } }; @@ -68,9 +68,9 @@ template< typename StaticArray, struct StaticArrayAssignment< StaticArray, T, false > { __cuda_callable__ - static void assign( StaticArray& a, const T& t ) + static void assign( StaticArray& a, const T& v ) { - StaticFor< 0, StaticArray::getSize() >::exec( detail::AssignValueFunctor{}, a, t ); + StaticFor< 0, StaticArray::getSize() >::exec( detail::AssignValueFunctor{}, a, v ); } }; diff --git a/src/TNL/Containers/StaticArray.h b/src/TNL/Containers/StaticArray.h index 0a147f7500..2421305a7d 100644 --- a/src/TNL/Containers/StaticArray.h +++ b/src/TNL/Containers/StaticArray.h @@ -181,18 +181,18 @@ public: StaticArray< Size, Value >& operator=( const StaticArray< Size, Value >& array ); /** - * \brief Assigns an object \e t of type \e T. + * \brief Assigns an object \e v of type \e T. * * T can be: * * 1. Static linear container implementing operator[] and having the same size. - * In this case, \e t is copied to this array elementwise. + * In this case, \e v is copied to this array elementwise. * 2. An object that can be converted to \e Value type. In this case all elements - * are set to \e t. + * are set to \e v. */ template< typename T > __cuda_callable__ - StaticArray< Size, Value >& operator=( const T& t ); + StaticArray< Size, Value >& operator=( const T& v ); /** * \brief This function checks whether this static array is equal to another \e array. diff --git a/src/UnitTests/Containers/StaticArrayTest.cpp b/src/UnitTests/Containers/StaticArrayTest.cpp index c98f42b0a9..b22afa798d 100644 --- a/src/UnitTests/Containers/StaticArrayTest.cpp +++ b/src/UnitTests/Containers/StaticArrayTest.cpp @@ -224,7 +224,6 @@ TYPED_TEST( StaticArrayTest, AssignmentOperator ) u3 = 1; for( int i = 0; i < size; i++ ) EXPECT_EQ( u3[ i ], 1 ); - } TYPED_TEST( StaticArrayTest, setValue ) -- GitLab