[v3,18/18] libcamera: includes: Formatting improvements
diff mbox series

Message ID 20240902154212.1281257-19-mzamazal@redhat.com
State Accepted
Headers show
Series
  • Remove unused includes
Related show

Commit Message

Milan Zamazal Sept. 2, 2024, 3:42 p.m. UTC
The LSP autoformatter doesn't like some of the current formatting, let's
make it happier.  Note that not all of its suggestions were accepted
because readability is preferred and adjusting .clang-format may not be
easy or possible.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
---
 include/libcamera/base/utils.h                   | 2 +-
 include/libcamera/internal/ipa_data_serializer.h | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

Comments

Laurent Pinchart Sept. 2, 2024, 7:46 p.m. UTC | #1
Hi Milan,

Thank you for the patch.

On Mon, Sep 02, 2024 at 05:42:11PM +0200, Milan Zamazal wrote:
> The LSP autoformatter doesn't like some of the current formatting, let's
> make it happier.  Note that not all of its suggestions were accepted
> because readability is preferred and adjusting .clang-format may not be
> easy or possible.
> 
> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>

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

> ---
>  include/libcamera/base/utils.h                   | 2 +-
>  include/libcamera/internal/ipa_data_serializer.h | 7 ++++---
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/include/libcamera/base/utils.h b/include/libcamera/base/utils.h
> index 98c683a7..a9b27d0f 100644
> --- a/include/libcamera/base/utils.h
> +++ b/include/libcamera/base/utils.h
> @@ -12,8 +12,8 @@
>  #include <iterator>
>  #include <ostream>
>  #include <sstream>
> -#include <string>
>  #include <string.h>
> +#include <string>
>  #include <sys/time.h>
>  #include <type_traits>
>  #include <utility>
> diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h
> index 13470a89..66d9a19f 100644
> --- a/include/libcamera/internal/ipa_data_serializer.h
> +++ b/include/libcamera/internal/ipa_data_serializer.h
> @@ -18,6 +18,7 @@
>  #include <libcamera/control_ids.h>
>  #include <libcamera/framebuffer.h>
>  #include <libcamera/geometry.h>
> +
>  #include <libcamera/ipa/ipa_interface.h>
>  
>  #include "libcamera/internal/control_serializer.h"
> @@ -161,7 +162,7 @@ public:
>  		std::vector<SharedFD>::const_iterator fdIter = fdsBegin;
>  		for (uint32_t i = 0; i < vecLen; i++) {
>  			uint32_t sizeofData = readPOD<uint32_t>(dataIter, 0, dataEnd);
> -			uint32_t sizeofFds  = readPOD<uint32_t>(dataIter, 4, dataEnd);
> +			uint32_t sizeofFds = readPOD<uint32_t>(dataIter, 4, dataEnd);
>  			dataIter += 8;
>  
>  			ret[i] = IPADataSerializer<V>::deserialize(dataIter,
> @@ -268,7 +269,7 @@ public:
>  		std::vector<SharedFD>::const_iterator fdIter = fdsBegin;
>  		for (uint32_t i = 0; i < mapLen; i++) {
>  			uint32_t sizeofData = readPOD<uint32_t>(dataIter, 0, dataEnd);
> -			uint32_t sizeofFds  = readPOD<uint32_t>(dataIter, 4, dataEnd);
> +			uint32_t sizeofFds = readPOD<uint32_t>(dataIter, 4, dataEnd);
>  			dataIter += 8;
>  
>  			K key = IPADataSerializer<K>::deserialize(dataIter,
> @@ -280,7 +281,7 @@ public:
>  			dataIter += sizeofData;
>  			fdIter += sizeofFds;
>  			sizeofData = readPOD<uint32_t>(dataIter, 0, dataEnd);
> -			sizeofFds  = readPOD<uint32_t>(dataIter, 4, dataEnd);
> +			sizeofFds = readPOD<uint32_t>(dataIter, 4, dataEnd);
>  			dataIter += 8;
>  
>  			const V value = IPADataSerializer<V>::deserialize(dataIter,

Patch
diff mbox series

diff --git a/include/libcamera/base/utils.h b/include/libcamera/base/utils.h
index 98c683a7..a9b27d0f 100644
--- a/include/libcamera/base/utils.h
+++ b/include/libcamera/base/utils.h
@@ -12,8 +12,8 @@ 
 #include <iterator>
 #include <ostream>
 #include <sstream>
-#include <string>
 #include <string.h>
+#include <string>
 #include <sys/time.h>
 #include <type_traits>
 #include <utility>
diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h
index 13470a89..66d9a19f 100644
--- a/include/libcamera/internal/ipa_data_serializer.h
+++ b/include/libcamera/internal/ipa_data_serializer.h
@@ -18,6 +18,7 @@ 
 #include <libcamera/control_ids.h>
 #include <libcamera/framebuffer.h>
 #include <libcamera/geometry.h>
+
 #include <libcamera/ipa/ipa_interface.h>
 
 #include "libcamera/internal/control_serializer.h"
@@ -161,7 +162,7 @@  public:
 		std::vector<SharedFD>::const_iterator fdIter = fdsBegin;
 		for (uint32_t i = 0; i < vecLen; i++) {
 			uint32_t sizeofData = readPOD<uint32_t>(dataIter, 0, dataEnd);
-			uint32_t sizeofFds  = readPOD<uint32_t>(dataIter, 4, dataEnd);
+			uint32_t sizeofFds = readPOD<uint32_t>(dataIter, 4, dataEnd);
 			dataIter += 8;
 
 			ret[i] = IPADataSerializer<V>::deserialize(dataIter,
@@ -268,7 +269,7 @@  public:
 		std::vector<SharedFD>::const_iterator fdIter = fdsBegin;
 		for (uint32_t i = 0; i < mapLen; i++) {
 			uint32_t sizeofData = readPOD<uint32_t>(dataIter, 0, dataEnd);
-			uint32_t sizeofFds  = readPOD<uint32_t>(dataIter, 4, dataEnd);
+			uint32_t sizeofFds = readPOD<uint32_t>(dataIter, 4, dataEnd);
 			dataIter += 8;
 
 			K key = IPADataSerializer<K>::deserialize(dataIter,
@@ -280,7 +281,7 @@  public:
 			dataIter += sizeofData;
 			fdIter += sizeofFds;
 			sizeofData = readPOD<uint32_t>(dataIter, 0, dataEnd);
-			sizeofFds  = readPOD<uint32_t>(dataIter, 4, dataEnd);
+			sizeofFds = readPOD<uint32_t>(dataIter, 4, dataEnd);
 			dataIter += 8;
 
 			const V value = IPADataSerializer<V>::deserialize(dataIter,