[libcamera-devel,v2,2/2] libcamera: class: Drop 'klass' argument from documentation
diff mbox series

Message ID 20210420093859.14280-3-jacopo@jmondi.org
State Accepted
Delegated to: Jacopo Mondi
Headers show
Series
  • Minor fixes to src/libcamera/class.cpp
Related show

Commit Message

Jacopo Mondi April 20, 2021, 9:38 a.m. UTC
The LIBCAMERA_D_PTR() and LIBCAMERA_O_PTR() macros do not require an
argument, but the version of the macro consumed by Doxygen does.

Fix this by removing the klass parameter from both macros in their
documentation version.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 include/libcamera/class.h | 4 ++--
 src/libcamera/class.cpp   | 6 ++----
 2 files changed, 4 insertions(+), 6 deletions(-)

Comments

Niklas Söderlund April 20, 2021, 11:30 a.m. UTC | #1
Hi Jacopo,

Thanks for your patch.

On 2021-04-20 11:38:59 +0200, Jacopo Mondi wrote:
> The LIBCAMERA_D_PTR() and LIBCAMERA_O_PTR() macros do not require an
> argument, but the version of the macro consumed by Doxygen does.
> 
> Fix this by removing the klass parameter from both macros in their
> documentation version.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

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

> ---
>  include/libcamera/class.h | 4 ++--
>  src/libcamera/class.cpp   | 6 ++----
>  2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/include/libcamera/class.h b/include/libcamera/class.h
> index 466114ecfaf4..f384a4889588 100644
> --- a/include/libcamera/class.h
> +++ b/include/libcamera/class.h
> @@ -48,8 +48,8 @@ public:									\
>  #else
>  #define LIBCAMERA_DECLARE_PRIVATE()
>  #define LIBCAMERA_DECLARE_PUBLIC(klass)
> -#define LIBCAMERA_D_PTR(klass)
> -#define LIBCAMERA_O_PTR(klass)
> +#define LIBCAMERA_D_PTR()
> +#define LIBCAMERA_O_PTR()
>  #endif
>  
>  class Extensible
> diff --git a/src/libcamera/class.cpp b/src/libcamera/class.cpp
> index 171f7c0a927b..28c35633d7db 100644
> --- a/src/libcamera/class.cpp
> +++ b/src/libcamera/class.cpp
> @@ -95,9 +95,8 @@ namespace libcamera {
>   */
>  
>  /**
> - * \def LIBCAMERA_D_PTR(klass)
> + * \def LIBCAMERA_D_PTR()
>   * \brief Retrieve the private data pointer
> - * \param[in] klass The public class name
>   *
>   * This macro can be used in any member function of a class that inherits,
>   * directly or indirectly, from the Extensible class, to create a local
> @@ -105,9 +104,8 @@ namespace libcamera {
>   */
>  
>  /**
> - * \def LIBCAMERA_O_PTR(klass)
> + * \def LIBCAMERA_O_PTR()
>   * \brief Retrieve the public instance corresponding to the private data
> - * \param[in] klass The public class name
>   *
>   * This macro is the counterpart of LIBCAMERA_D_PTR() for private data classes.
>   * It can be used in any member function of the private data class to create a
> -- 
> 2.31.1
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
Laurent Pinchart April 20, 2021, 10:52 p.m. UTC | #2
Hi Jacopo,

Thank you for the patch.

On Tue, Apr 20, 2021 at 11:38:59AM +0200, Jacopo Mondi wrote:
> The LIBCAMERA_D_PTR() and LIBCAMERA_O_PTR() macros do not require an
> argument, but the version of the macro consumed by Doxygen does.

Oops, indeed.

> Fix this by removing the klass parameter from both macros in their
> documentation version.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

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

> ---
>  include/libcamera/class.h | 4 ++--
>  src/libcamera/class.cpp   | 6 ++----
>  2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/include/libcamera/class.h b/include/libcamera/class.h
> index 466114ecfaf4..f384a4889588 100644
> --- a/include/libcamera/class.h
> +++ b/include/libcamera/class.h
> @@ -48,8 +48,8 @@ public:									\
>  #else
>  #define LIBCAMERA_DECLARE_PRIVATE()
>  #define LIBCAMERA_DECLARE_PUBLIC(klass)
> -#define LIBCAMERA_D_PTR(klass)
> -#define LIBCAMERA_O_PTR(klass)
> +#define LIBCAMERA_D_PTR()
> +#define LIBCAMERA_O_PTR()
>  #endif
>  
>  class Extensible
> diff --git a/src/libcamera/class.cpp b/src/libcamera/class.cpp
> index 171f7c0a927b..28c35633d7db 100644
> --- a/src/libcamera/class.cpp
> +++ b/src/libcamera/class.cpp
> @@ -95,9 +95,8 @@ namespace libcamera {
>   */
>  
>  /**
> - * \def LIBCAMERA_D_PTR(klass)
> + * \def LIBCAMERA_D_PTR()
>   * \brief Retrieve the private data pointer
> - * \param[in] klass The public class name
>   *
>   * This macro can be used in any member function of a class that inherits,
>   * directly or indirectly, from the Extensible class, to create a local
> @@ -105,9 +104,8 @@ namespace libcamera {
>   */
>  
>  /**
> - * \def LIBCAMERA_O_PTR(klass)
> + * \def LIBCAMERA_O_PTR()
>   * \brief Retrieve the public instance corresponding to the private data
> - * \param[in] klass The public class name
>   *
>   * This macro is the counterpart of LIBCAMERA_D_PTR() for private data classes.
>   * It can be used in any member function of the private data class to create a

Patch
diff mbox series

diff --git a/include/libcamera/class.h b/include/libcamera/class.h
index 466114ecfaf4..f384a4889588 100644
--- a/include/libcamera/class.h
+++ b/include/libcamera/class.h
@@ -48,8 +48,8 @@  public:									\
 #else
 #define LIBCAMERA_DECLARE_PRIVATE()
 #define LIBCAMERA_DECLARE_PUBLIC(klass)
-#define LIBCAMERA_D_PTR(klass)
-#define LIBCAMERA_O_PTR(klass)
+#define LIBCAMERA_D_PTR()
+#define LIBCAMERA_O_PTR()
 #endif
 
 class Extensible
diff --git a/src/libcamera/class.cpp b/src/libcamera/class.cpp
index 171f7c0a927b..28c35633d7db 100644
--- a/src/libcamera/class.cpp
+++ b/src/libcamera/class.cpp
@@ -95,9 +95,8 @@  namespace libcamera {
  */
 
 /**
- * \def LIBCAMERA_D_PTR(klass)
+ * \def LIBCAMERA_D_PTR()
  * \brief Retrieve the private data pointer
- * \param[in] klass The public class name
  *
  * This macro can be used in any member function of a class that inherits,
  * directly or indirectly, from the Extensible class, to create a local
@@ -105,9 +104,8 @@  namespace libcamera {
  */
 
 /**
- * \def LIBCAMERA_O_PTR(klass)
+ * \def LIBCAMERA_O_PTR()
  * \brief Retrieve the public instance corresponding to the private data
- * \param[in] klass The public class name
  *
  * This macro is the counterpart of LIBCAMERA_D_PTR() for private data classes.
  * It can be used in any member function of the private data class to create a