test: ipa: rkisp1-utils: Fix coding style for template arguments
diff mbox series

Message ID 20240601235740.14594-1-laurent.pinchart@ideasonboard.com
State Accepted
Commit 1020b6be51f4475a2016d93799af5753014157fa
Headers show
Series
  • test: ipa: rkisp1-utils: Fix coding style for template arguments
Related show

Commit Message

Laurent Pinchart June 1, 2024, 11:57 p.m. UTC
The coding style names template arguments using CamelCase with an
uppercase initial letter. Fix the template arguments in the rkisp1-utils
test.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 test/ipa/rkisp1/rkisp1-utils.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


base-commit: aad5837d70f8d3dc19f62f88f1434e3c9cf5ffbe

Comments

Paul Elder June 2, 2024, 4:48 p.m. UTC | #1
On Sun, Jun 02, 2024 at 02:57:40AM +0300, Laurent Pinchart wrote:
> The coding style names template arguments using CamelCase with an
> uppercase initial letter. Fix the template arguments in the rkisp1-utils
> test.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> ---
>  test/ipa/rkisp1/rkisp1-utils.cpp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/test/ipa/rkisp1/rkisp1-utils.cpp b/test/ipa/rkisp1/rkisp1-utils.cpp
> index 9fff0cdcef15..e48f8d3622d2 100644
> --- a/test/ipa/rkisp1/rkisp1-utils.cpp
> +++ b/test/ipa/rkisp1/rkisp1-utils.cpp
> @@ -21,10 +21,10 @@ using namespace ipa::rkisp1;
>  class RkISP1UtilsTest : public Test
>  {
>  protected:
> -	template<unsigned int intPrec, unsigned fracPrec, typename T>
> +	template<unsigned int IntPrec, unsigned FracPrec, typename T>
>  	int testSingleFixedPoint(double input, T expected)
>  	{
> -		T ret = utils::floatingToFixedPoint<intPrec, fracPrec, T>(input);
> +		T ret = utils::floatingToFixedPoint<IntPrec, FracPrec, T>(input);
>  		if (ret != expected) {
>  			cerr << "Expected " << input << " to convert to "
>  			     << expected << ", got " << ret << std::endl;
> @@ -35,7 +35,7 @@ protected:
>  		 * The precision check is fairly arbitrary but is based on what
>  		 * the rkisp1 is capable of in the crosstalk module.
>  		 */
> -		double f = utils::fixedToFloatingPoint<intPrec, fracPrec, double>(ret);
> +		double f = utils::fixedToFloatingPoint<IntPrec, FracPrec, double>(ret);
>  		if (std::abs(f - input) > 0.005) {
>  			cerr << "Reverse conversion expected " << ret
>  			     << " to convert to " << input
> 
> base-commit: aad5837d70f8d3dc19f62f88f1434e3c9cf5ffbe
Kieran Bingham June 3, 2024, 8:53 a.m. UTC | #2
Quoting Laurent Pinchart (2024-06-02 00:57:40)
> The coding style names template arguments using CamelCase with an
> uppercase initial letter. Fix the template arguments in the rkisp1-utils
> test.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  test/ipa/rkisp1/rkisp1-utils.cpp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/test/ipa/rkisp1/rkisp1-utils.cpp b/test/ipa/rkisp1/rkisp1-utils.cpp
> index 9fff0cdcef15..e48f8d3622d2 100644
> --- a/test/ipa/rkisp1/rkisp1-utils.cpp
> +++ b/test/ipa/rkisp1/rkisp1-utils.cpp
> @@ -21,10 +21,10 @@ using namespace ipa::rkisp1;
>  class RkISP1UtilsTest : public Test
>  {
>  protected:
> -       template<unsigned int intPrec, unsigned fracPrec, typename T>
> +       template<unsigned int IntPrec, unsigned FracPrec, typename T>
>         int testSingleFixedPoint(double input, T expected)
>         {
> -               T ret = utils::floatingToFixedPoint<intPrec, fracPrec, T>(input);
> +               T ret = utils::floatingToFixedPoint<IntPrec, FracPrec, T>(input);
>                 if (ret != expected) {
>                         cerr << "Expected " << input << " to convert to "
>                              << expected << ", got " << ret << std::endl;
> @@ -35,7 +35,7 @@ protected:
>                  * The precision check is fairly arbitrary but is based on what
>                  * the rkisp1 is capable of in the crosstalk module.
>                  */
> -               double f = utils::fixedToFloatingPoint<intPrec, fracPrec, double>(ret);
> +               double f = utils::fixedToFloatingPoint<IntPrec, FracPrec, double>(ret);
>                 if (std::abs(f - input) > 0.005) {
>                         cerr << "Reverse conversion expected " << ret
>                              << " to convert to " << input
> 
> base-commit: aad5837d70f8d3dc19f62f88f1434e3c9cf5ffbe
> -- 
> Regards,
> 
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/test/ipa/rkisp1/rkisp1-utils.cpp b/test/ipa/rkisp1/rkisp1-utils.cpp
index 9fff0cdcef15..e48f8d3622d2 100644
--- a/test/ipa/rkisp1/rkisp1-utils.cpp
+++ b/test/ipa/rkisp1/rkisp1-utils.cpp
@@ -21,10 +21,10 @@  using namespace ipa::rkisp1;
 class RkISP1UtilsTest : public Test
 {
 protected:
-	template<unsigned int intPrec, unsigned fracPrec, typename T>
+	template<unsigned int IntPrec, unsigned FracPrec, typename T>
 	int testSingleFixedPoint(double input, T expected)
 	{
-		T ret = utils::floatingToFixedPoint<intPrec, fracPrec, T>(input);
+		T ret = utils::floatingToFixedPoint<IntPrec, FracPrec, T>(input);
 		if (ret != expected) {
 			cerr << "Expected " << input << " to convert to "
 			     << expected << ", got " << ret << std::endl;
@@ -35,7 +35,7 @@  protected:
 		 * The precision check is fairly arbitrary but is based on what
 		 * the rkisp1 is capable of in the crosstalk module.
 		 */
-		double f = utils::fixedToFloatingPoint<intPrec, fracPrec, double>(ret);
+		double f = utils::fixedToFloatingPoint<IntPrec, FracPrec, double>(ret);
 		if (std::abs(f - input) > 0.005) {
 			cerr << "Reverse conversion expected " << ret
 			     << " to convert to " << input