[libcamera-devel] libcamera: log: Hide value of the ASSERT() macro
diff mbox series

Message ID 20210522002309.26083-1-laurent.pinchart@ideasonboard.com
State Accepted
Commit fd1cbe84476b25b458c3dbe78ec6c55e774ce435
Headers show
Series
  • [libcamera-devel] libcamera: log: Hide value of the ASSERT() macro
Related show

Commit Message

Laurent Pinchart May 22, 2021, 12:23 a.m. UTC
ASSERT() is a function-like macro that expands to internal code. Hide
the expansion from the generated documentation, as it would only confuse
the reader.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/log.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Sebastian Fricke May 22, 2021, 6:15 a.m. UTC | #1
Hey Laurent,

Thank you for the patch.

On 22.05.2021 03:23, Laurent Pinchart wrote:
>ASSERT() is a function-like macro that expands to internal code. Hide
>the expansion from the generated documentation, as it would only confuse
>the reader.

Sounds good.

>
>Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Fricke <sebastian.fricke@posteo.net>

>---
> src/libcamera/log.cpp | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp
>index 985952249289..dd991647b9bc 100644
>--- a/src/libcamera/log.cpp
>+++ b/src/libcamera/log.cpp
>@@ -990,6 +990,7 @@ LogMessage _log(const LogCategory *category, LogSeverity severity,
>
> /**
>  * \def ASSERT(condition)
>+ * \hideinitializer
>  * \brief Abort program execution if assertion fails
>  *
>  * If \a condition is false, ASSERT() logs an error message with the Fatal log
>-- 
>Regards,
>
>Laurent Pinchart
>
Umang Jain May 22, 2021, 10:59 a.m. UTC | #2
Hi Laurent,

Thank you for the patch

On 5/22/21 5:53 AM, Laurent Pinchart wrote:
> ASSERT() is a function-like macro that expands to internal code. Hide
> the expansion from the generated documentation, as it would only confuse
> the reader.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
>   src/libcamera/log.cpp | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp
> index 985952249289..dd991647b9bc 100644
> --- a/src/libcamera/log.cpp
> +++ b/src/libcamera/log.cpp
> @@ -990,6 +990,7 @@ LogMessage _log(const LogCategory *category, LogSeverity severity,
>   
>   /**
>    * \def ASSERT(condition)
> + * \hideinitializer
>    * \brief Abort program execution if assertion fails
>    *
>    * If \a condition is false, ASSERT() logs an error message with the Fatal log

Patch
diff mbox series

diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp
index 985952249289..dd991647b9bc 100644
--- a/src/libcamera/log.cpp
+++ b/src/libcamera/log.cpp
@@ -990,6 +990,7 @@  LogMessage _log(const LogCategory *category, LogSeverity severity,
 
 /**
  * \def ASSERT(condition)
+ * \hideinitializer
  * \brief Abort program execution if assertion fails
  *
  * If \a condition is false, ASSERT() logs an error message with the Fatal log