[v3,07/18] libcamera: libipa: Remove unused includes
diff mbox series

Message ID 20240902154212.1281257-8-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 includes that are not used can be removed.  And two identified
missing includes (directly used but available only through other
includes) are added.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
---
 src/ipa/libipa/histogram.h             | 1 -
 src/ipa/libipa/matrix.h                | 1 -
 src/ipa/libipa/matrix_interpolator.cpp | 7 -------
 src/ipa/libipa/matrix_interpolator.h   | 2 --
 src/ipa/libipa/pwl.cpp                 | 2 --
 src/ipa/libipa/pwl.h                   | 3 ---
 src/ipa/libipa/vector.h                | 4 ++--
 7 files changed, 2 insertions(+), 18 deletions(-)

Comments

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

Thank you for the patch.

On Mon, Sep 02, 2024 at 05:42:00PM +0200, Milan Zamazal wrote:
> The includes that are not used can be removed.  And two identified
> missing includes (directly used but available only through other
> includes) are added.
> 
> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>

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

> ---
>  src/ipa/libipa/histogram.h             | 1 -
>  src/ipa/libipa/matrix.h                | 1 -
>  src/ipa/libipa/matrix_interpolator.cpp | 7 -------
>  src/ipa/libipa/matrix_interpolator.h   | 2 --
>  src/ipa/libipa/pwl.cpp                 | 2 --
>  src/ipa/libipa/pwl.h                   | 3 ---
>  src/ipa/libipa/vector.h                | 4 ++--
>  7 files changed, 2 insertions(+), 18 deletions(-)
> 
> diff --git a/src/ipa/libipa/histogram.h b/src/ipa/libipa/histogram.h
> index 032adca0..6fd64168 100644
> --- a/src/ipa/libipa/histogram.h
> +++ b/src/ipa/libipa/histogram.h
> @@ -7,7 +7,6 @@
>  
>  #pragma once
>  
> -#include <assert.h>
>  #include <limits.h>
>  #include <stdint.h>
>  #include <type_traits>
> diff --git a/src/ipa/libipa/matrix.h b/src/ipa/libipa/matrix.h
> index 8aa8f343..5471e697 100644
> --- a/src/ipa/libipa/matrix.h
> +++ b/src/ipa/libipa/matrix.h
> @@ -7,7 +7,6 @@
>  #pragma once
>  
>  #include <algorithm>
> -#include <cmath>
>  #include <sstream>
>  #include <vector>
>  
> diff --git a/src/ipa/libipa/matrix_interpolator.cpp b/src/ipa/libipa/matrix_interpolator.cpp
> index 04ca177f..d5188f8a 100644
> --- a/src/ipa/libipa/matrix_interpolator.cpp
> +++ b/src/ipa/libipa/matrix_interpolator.cpp
> @@ -6,15 +6,8 @@
>   */
>  #include "matrix_interpolator.h"
>  
> -#include <algorithm>
> -#include <string>
> -
>  #include <libcamera/base/log.h>
>  
> -#include "libcamera/internal/yaml_parser.h"
> -
> -#include "matrix.h"
> -
>  /**
>   * \file matrix_interpolator.h
>   * \brief Helper class for interpolating maps of matrices
> diff --git a/src/ipa/libipa/matrix_interpolator.h b/src/ipa/libipa/matrix_interpolator.h
> index 087c4fd1..afbce538 100644
> --- a/src/ipa/libipa/matrix_interpolator.h
> +++ b/src/ipa/libipa/matrix_interpolator.h
> @@ -7,10 +7,8 @@
>  
>  #pragma once
>  
> -#include <algorithm>
>  #include <map>
>  #include <string>
> -#include <tuple>
>  
>  #include <libcamera/base/log.h>
>  
> diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp
> index 9b213754..88fe2022 100644
> --- a/src/ipa/libipa/pwl.cpp
> +++ b/src/ipa/libipa/pwl.cpp
> @@ -8,10 +8,8 @@
>  
>  #include "pwl.h"
>  
> -#include <assert.h>
>  #include <cmath>
>  #include <sstream>
> -#include <stdexcept>
>  
>  /**
>   * \file pwl.h
> diff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h
> index b6f93494..d4ec9f4f 100644
> --- a/src/ipa/libipa/pwl.h
> +++ b/src/ipa/libipa/pwl.h
> @@ -7,14 +7,11 @@
>  #pragma once
>  
>  #include <algorithm>
> -#include <cmath>
>  #include <functional>
>  #include <string>
>  #include <utility>
>  #include <vector>
>  
> -#include "libcamera/internal/yaml_parser.h"
> -
>  #include "vector.h"
>  
>  namespace libcamera {
> diff --git a/src/ipa/libipa/vector.h b/src/ipa/libipa/vector.h
> index 556e0967..8612a06a 100644
> --- a/src/ipa/libipa/vector.h
> +++ b/src/ipa/libipa/vector.h
> @@ -6,10 +6,10 @@
>   */
>  #pragma once
>  
> -#include <algorithm>
>  #include <array>
>  #include <cmath>
> -#include <sstream>
> +#include <optional>
> +#include <ostream>
>  
>  #include <libcamera/base/log.h>
>  #include <libcamera/base/span.h>

Patch
diff mbox series

diff --git a/src/ipa/libipa/histogram.h b/src/ipa/libipa/histogram.h
index 032adca0..6fd64168 100644
--- a/src/ipa/libipa/histogram.h
+++ b/src/ipa/libipa/histogram.h
@@ -7,7 +7,6 @@ 
 
 #pragma once
 
-#include <assert.h>
 #include <limits.h>
 #include <stdint.h>
 #include <type_traits>
diff --git a/src/ipa/libipa/matrix.h b/src/ipa/libipa/matrix.h
index 8aa8f343..5471e697 100644
--- a/src/ipa/libipa/matrix.h
+++ b/src/ipa/libipa/matrix.h
@@ -7,7 +7,6 @@ 
 #pragma once
 
 #include <algorithm>
-#include <cmath>
 #include <sstream>
 #include <vector>
 
diff --git a/src/ipa/libipa/matrix_interpolator.cpp b/src/ipa/libipa/matrix_interpolator.cpp
index 04ca177f..d5188f8a 100644
--- a/src/ipa/libipa/matrix_interpolator.cpp
+++ b/src/ipa/libipa/matrix_interpolator.cpp
@@ -6,15 +6,8 @@ 
  */
 #include "matrix_interpolator.h"
 
-#include <algorithm>
-#include <string>
-
 #include <libcamera/base/log.h>
 
-#include "libcamera/internal/yaml_parser.h"
-
-#include "matrix.h"
-
 /**
  * \file matrix_interpolator.h
  * \brief Helper class for interpolating maps of matrices
diff --git a/src/ipa/libipa/matrix_interpolator.h b/src/ipa/libipa/matrix_interpolator.h
index 087c4fd1..afbce538 100644
--- a/src/ipa/libipa/matrix_interpolator.h
+++ b/src/ipa/libipa/matrix_interpolator.h
@@ -7,10 +7,8 @@ 
 
 #pragma once
 
-#include <algorithm>
 #include <map>
 #include <string>
-#include <tuple>
 
 #include <libcamera/base/log.h>
 
diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp
index 9b213754..88fe2022 100644
--- a/src/ipa/libipa/pwl.cpp
+++ b/src/ipa/libipa/pwl.cpp
@@ -8,10 +8,8 @@ 
 
 #include "pwl.h"
 
-#include <assert.h>
 #include <cmath>
 #include <sstream>
-#include <stdexcept>
 
 /**
  * \file pwl.h
diff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h
index b6f93494..d4ec9f4f 100644
--- a/src/ipa/libipa/pwl.h
+++ b/src/ipa/libipa/pwl.h
@@ -7,14 +7,11 @@ 
 #pragma once
 
 #include <algorithm>
-#include <cmath>
 #include <functional>
 #include <string>
 #include <utility>
 #include <vector>
 
-#include "libcamera/internal/yaml_parser.h"
-
 #include "vector.h"
 
 namespace libcamera {
diff --git a/src/ipa/libipa/vector.h b/src/ipa/libipa/vector.h
index 556e0967..8612a06a 100644
--- a/src/ipa/libipa/vector.h
+++ b/src/ipa/libipa/vector.h
@@ -6,10 +6,10 @@ 
  */
 #pragma once
 
-#include <algorithm>
 #include <array>
 #include <cmath>
-#include <sstream>
+#include <optional>
+#include <ostream>
 
 #include <libcamera/base/log.h>
 #include <libcamera/base/span.h>