From 97037b06cb4aed64adff023c68252fbb45fd388c Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 27 Aug 2023 20:50:53 +0200 Subject: [PATCH] libluna: Document Ignore.h and ImplPOSIX.cpp --- libluna/include/luna/Ignore.h | 24 ++++++++++++++++++++++++ libluna/src/ImplPOSIX.cpp | 9 ++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/libluna/include/luna/Ignore.h b/libluna/include/luna/Ignore.h index 2a314f1c..5c9959a1 100644 --- a/libluna/include/luna/Ignore.h +++ b/libluna/include/luna/Ignore.h @@ -1,5 +1,29 @@ +/** + * @file Ignore.h + * @author apio (cloudapio.eu) + * @brief Do nothing. + * + * @copyright Copyright (c) 2023, the Luna authors. + * + */ + #pragma once +/** + * @brief Do nothing. + * + * Calling + * ignore(a, b, c); + * is a more compact equivalent of doing: + * (void)a; + * (void)b; + * (void)c; + * + * This function is used to discard unused variables avoiding compiler warnings, if you know they'll be used in the + * future. + * + * @tparam Args The list of ignored variable types. + */ template constexpr void ignore(Args...) { } diff --git a/libluna/src/ImplPOSIX.cpp b/libluna/src/ImplPOSIX.cpp index ba799a32..e0521aed 100644 --- a/libluna/src/ImplPOSIX.cpp +++ b/libluna/src/ImplPOSIX.cpp @@ -1,4 +1,11 @@ -/* POSIX userspace implementation of libluna hooks. */ +/** + * @file ImplPOSIX.cpp + * @author apio (cloudapio.eu) + * @brief POSIX userspace implementation of libluna hooks. + * + * @copyright Copyright (c) 2023, the Luna authors. + * + */ #include #include