[libcamera-devel,05/14] libcamera: bound_method: Drop unused BoundMethodBase::connectionType()

Message ID 20200104050947.7673-6-laurent.pinchart@ideasonboard.com
State Accepted
Commit 9fe225a79fe1f3a3b63c7064bba5e1920974effd
Headers show
Series
  • object: Propagate return value of invoked method
Related show

Commit Message

Laurent Pinchart Jan. 4, 2020, 5:09 a.m. UTC
The BoundMethodBase::connectionType() method isn't used, drop it. While
it at make the connectionType_ member private as it is only used by the
class.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 include/libcamera/bound_method.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Niklas Söderlund Jan. 7, 2020, 7:01 p.m. UTC | #1
Hi Laurent,

Thanks for your patch.

On 2020-01-04 07:09:38 +0200, Laurent Pinchart wrote:
> The BoundMethodBase::connectionType() method isn't used, drop it. While
> it at make the connectionType_ member private as it is only used by the
> class.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  include/libcamera/bound_method.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/libcamera/bound_method.h b/include/libcamera/bound_method.h
> index f23b17c7dd98..a1541212ff3d 100644
> --- a/include/libcamera/bound_method.h
> +++ b/include/libcamera/bound_method.h
> @@ -35,7 +35,6 @@ public:
>  	bool match(Object *object) { return object == object_; }
>  
>  	Object *object() const { return object_; }
> -	ConnectionType connectionType() const { return connectionType_; }
>  
>  	virtual void invokePack(void *pack) = 0;
>  
> @@ -44,6 +43,8 @@ protected:
>  
>  	void *obj_;
>  	Object *object_;
> +
> +private:
>  	ConnectionType connectionType_;
>  };
>  
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/include/libcamera/bound_method.h b/include/libcamera/bound_method.h
index f23b17c7dd98..a1541212ff3d 100644
--- a/include/libcamera/bound_method.h
+++ b/include/libcamera/bound_method.h
@@ -35,7 +35,6 @@  public:
 	bool match(Object *object) { return object == object_; }
 
 	Object *object() const { return object_; }
-	ConnectionType connectionType() const { return connectionType_; }
 
 	virtual void invokePack(void *pack) = 0;
 
@@ -44,6 +43,8 @@  protected:
 
 	void *obj_;
 	Object *object_;
+
+private:
 	ConnectionType connectionType_;
 };