[v4,1/4] ipa: software_isp: Add constructor to the IPA context
diff mbox series

Message ID 20241126091509.89677-2-mzamazal@redhat.com
State Superseded
Headers show
Series
  • Add contrast control to software ISP
Related show

Commit Message

Milan Zamazal Nov. 26, 2024, 9:15 a.m. UTC
Let's have a constructor that takes just the non-default argument,
without the need to specify the defaults.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
---
 src/ipa/simple/ipa_context.h   | 5 +++++
 src/ipa/simple/soft_simple.cpp | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

Kieran Bingham Nov. 26, 2024, 9:32 a.m. UTC | #1
Quoting Milan Zamazal (2024-11-26 09:15:02)
> Let's have a constructor that takes just the non-default argument,
> without the need to specify the defaults.
> 
> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>

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

> ---
>  src/ipa/simple/ipa_context.h   | 5 +++++
>  src/ipa/simple/soft_simple.cpp | 2 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/ipa/simple/ipa_context.h b/src/ipa/simple/ipa_context.h
> index fd121eebe..fd7343e91 100644
> --- a/src/ipa/simple/ipa_context.h
> +++ b/src/ipa/simple/ipa_context.h
> @@ -59,6 +59,11 @@ struct IPAFrameContext : public FrameContext {
>  };
>  
>  struct IPAContext {
> +       IPAContext(unsigned int frameContextSize)
> +               : frameContexts(frameContextSize)
> +       {
> +       }
> +
>         IPASessionConfiguration configuration;
>         IPAActiveState activeState;
>         FCQueue<IPAFrameContext> frameContexts;
> diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp
> index ac2a94210..67ccc9ae0 100644
> --- a/src/ipa/simple/soft_simple.cpp
> +++ b/src/ipa/simple/soft_simple.cpp
> @@ -41,7 +41,7 @@ class IPASoftSimple : public ipa::soft::IPASoftInterface, public Module
>  {
>  public:
>         IPASoftSimple()
> -               : context_({ {}, {}, { kMaxFrameContexts } })
> +               : context_(kMaxFrameContexts)
>         {
>         }
>  
> -- 
> 2.44.2
>

Patch
diff mbox series

diff --git a/src/ipa/simple/ipa_context.h b/src/ipa/simple/ipa_context.h
index fd121eebe..fd7343e91 100644
--- a/src/ipa/simple/ipa_context.h
+++ b/src/ipa/simple/ipa_context.h
@@ -59,6 +59,11 @@  struct IPAFrameContext : public FrameContext {
 };
 
 struct IPAContext {
+	IPAContext(unsigned int frameContextSize)
+		: frameContexts(frameContextSize)
+	{
+	}
+
 	IPASessionConfiguration configuration;
 	IPAActiveState activeState;
 	FCQueue<IPAFrameContext> frameContexts;
diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp
index ac2a94210..67ccc9ae0 100644
--- a/src/ipa/simple/soft_simple.cpp
+++ b/src/ipa/simple/soft_simple.cpp
@@ -41,7 +41,7 @@  class IPASoftSimple : public ipa::soft::IPASoftInterface, public Module
 {
 public:
 	IPASoftSimple()
-		: context_({ {}, {}, { kMaxFrameContexts } })
+		: context_(kMaxFrameContexts)
 	{
 	}