[libcamera-devel,1/5] test: v4l2_device: Order class sections

Message ID 20190508165814.26201-2-niklas.soderlund@ragnatech.se
State Superseded
Headers show
Series
  • test: v4l2_device: Cleanups and a small speed increase
Related show

Commit Message

Niklas Söderlund May 8, 2019, 4:58 p.m. UTC
Order the sections of a class public, protected and private. There is no
functional change only restructuring of existing code to align with the
style of other tests.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 test/v4l2_device/buffer_sharing.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Laurent Pinchart May 11, 2019, 1:45 a.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Wed, May 08, 2019 at 06:58:10PM +0200, Niklas Söderlund wrote:
> Order the sections of a class public, protected and private. There is no
> functional change only restructuring of existing code to align with the
> style of other tests.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  test/v4l2_device/buffer_sharing.cpp | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/test/v4l2_device/buffer_sharing.cpp b/test/v4l2_device/buffer_sharing.cpp
> index 45b07fc4905b826e..09695239ee4b9e80 100644
> --- a/test/v4l2_device/buffer_sharing.cpp
> +++ b/test/v4l2_device/buffer_sharing.cpp
> @@ -27,14 +27,6 @@ public:
>  	{
>  	}
>  
> -private:
> -	const unsigned int bufferCount = 4;
> -
> -	V4L2Device *output_;
> -
> -	unsigned int framesCaptured_;
> -	unsigned int framesOutput_;
> -
>  protected:
>  	int init()
>  	{
> @@ -182,6 +174,14 @@ protected:
>  
>  		V4L2DeviceTest::cleanup();
>  	}
> +
> +private:
> +	const unsigned int bufferCount = 4;
> +
> +	V4L2Device *output_;
> +
> +	unsigned int framesCaptured_;
> +	unsigned int framesOutput_;
>  };
>  
>  TEST_REGISTER(BufferSharingTest);
> -- 
> 2.21.0
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/test/v4l2_device/buffer_sharing.cpp b/test/v4l2_device/buffer_sharing.cpp
index 45b07fc4905b826e..09695239ee4b9e80 100644
--- a/test/v4l2_device/buffer_sharing.cpp
+++ b/test/v4l2_device/buffer_sharing.cpp
@@ -27,14 +27,6 @@  public:
 	{
 	}
 
-private:
-	const unsigned int bufferCount = 4;
-
-	V4L2Device *output_;
-
-	unsigned int framesCaptured_;
-	unsigned int framesOutput_;
-
 protected:
 	int init()
 	{
@@ -182,6 +174,14 @@  protected:
 
 		V4L2DeviceTest::cleanup();
 	}
+
+private:
+	const unsigned int bufferCount = 4;
+
+	V4L2Device *output_;
+
+	unsigned int framesCaptured_;
+	unsigned int framesOutput_;
 };
 
 TEST_REGISTER(BufferSharingTest);