[v1] libcamera: base: mutex: Remove unnecessary constructors
diff mbox series

Message ID 20250303193330.785575-1-barnabas.pocze@ideasonboard.com
State Accepted
Headers show
Series
  • [v1] libcamera: base: mutex: Remove unnecessary constructors
Related show

Commit Message

Barnabás Pőcze March 3, 2025, 7:33 p.m. UTC
The compiler defined default constructor works perfectly fine.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 include/libcamera/base/mutex.h | 8 --------
 1 file changed, 8 deletions(-)

Comments

Laurent Pinchart March 3, 2025, 8:59 p.m. UTC | #1
Hi Barnabás,

Thank you for the patch.

On Mon, Mar 03, 2025 at 08:33:30PM +0100, Barnabás Pőcze wrote:
> The compiler defined default constructor works perfectly fine.
> 
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>

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

> ---
>  include/libcamera/base/mutex.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/include/libcamera/base/mutex.h b/include/libcamera/base/mutex.h
> index fa9a8d0dc..20ebe6fee 100644
> --- a/include/libcamera/base/mutex.h
> +++ b/include/libcamera/base/mutex.h
> @@ -23,10 +23,6 @@ namespace libcamera {
>  class LIBCAMERA_TSA_CAPABILITY("mutex") Mutex final
>  {
>  public:
> -	constexpr Mutex()
> -	{
> -	}
> -
>  	void lock() LIBCAMERA_TSA_ACQUIRE()
>  	{
>  		mutex_.lock();
> @@ -84,10 +80,6 @@ private:
>  class ConditionVariable final
>  {
>  public:
> -	ConditionVariable()
> -	{
> -	}
> -
>  	void notify_one() noexcept
>  	{
>  		cv_.notify_one();
Kieran Bingham March 4, 2025, 10:04 a.m. UTC | #2
Quoting Barnabás Pőcze (2025-03-03 19:33:30)
> The compiler defined default constructor works perfectly fine.
> 
> Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>

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

> ---
>  include/libcamera/base/mutex.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/include/libcamera/base/mutex.h b/include/libcamera/base/mutex.h
> index fa9a8d0dc..20ebe6fee 100644
> --- a/include/libcamera/base/mutex.h
> +++ b/include/libcamera/base/mutex.h
> @@ -23,10 +23,6 @@ namespace libcamera {
>  class LIBCAMERA_TSA_CAPABILITY("mutex") Mutex final
>  {
>  public:
> -       constexpr Mutex()
> -       {
> -       }
> -
>         void lock() LIBCAMERA_TSA_ACQUIRE()
>         {
>                 mutex_.lock();
> @@ -84,10 +80,6 @@ private:
>  class ConditionVariable final
>  {
>  public:
> -       ConditionVariable()
> -       {
> -       }
> -
>         void notify_one() noexcept
>         {
>                 cv_.notify_one();
> -- 
> 2.48.1
>

Patch
diff mbox series

diff --git a/include/libcamera/base/mutex.h b/include/libcamera/base/mutex.h
index fa9a8d0dc..20ebe6fee 100644
--- a/include/libcamera/base/mutex.h
+++ b/include/libcamera/base/mutex.h
@@ -23,10 +23,6 @@  namespace libcamera {
 class LIBCAMERA_TSA_CAPABILITY("mutex") Mutex final
 {
 public:
-	constexpr Mutex()
-	{
-	}
-
 	void lock() LIBCAMERA_TSA_ACQUIRE()
 	{
 		mutex_.lock();
@@ -84,10 +80,6 @@  private:
 class ConditionVariable final
 {
 public:
-	ConditionVariable()
-	{
-	}
-
 	void notify_one() noexcept
 	{
 		cv_.notify_one();