diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-23 08:22:28 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-23 08:22:28 +0200 |
| commit | 72f132b8fb9f2a47b0f723f4dc4eaa4fdb0c45bd (patch) | |
| tree | 8e1fd9656a6650129c96f11ff7453f4a56b27517 /lib/Macros.h | |
| parent | 892f9abd9bde257acef9a9d8b17707a01100cd25 (diff) | |
dev: Improve makefile, add BTB_POSIX, and BTB_WINDOWS macro.
- Refactor library code for better maintenance.
- Improve code quality by using well known macros for status
code.
- Don't let the CLI pass when '-' is being passed as argument
and is not recognized.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'lib/Macros.h')
| -rw-r--r-- | lib/Macros.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Macros.h b/lib/Macros.h index 85fb45b..35a44a1 100644 --- a/lib/Macros.h +++ b/lib/Macros.h @@ -12,25 +12,26 @@ extern "C" #include <rang.h> -#define LIKELY(ARG) (ARG) ? assert(false) : ((void)0) +#define LIKELY(ARG) (ARG) ? assert(false) : ((void)0) #define UNLIKELY(ARG) LIKELY(!(ARG)) -#define LIBBTB_VERSION "1.2.0" +#define LIBBTB_VERSION "1.1.0" -#define LIBBTB_VERSION_BCD 0x0120 +#define LIBBTB_VERSION_BCD 0x0110 #define LIBBTB_VERSION_MAJOR 1 -#define LIBBTB_VERSION_MINOR 0 +#define LIBBTB_VERSION_MINOR 1 #define LIBBTB_VERSION_PATCH 0 #define LIBBTB_UNUSED(X) ((void)X) -namespace logger +namespace BTB::Logger { + /// @brief replacement for std::cout for BTB logging. inline std::ostream& info() noexcept { auto& out = std::cout; out << rang::fg::red << "btb: " << rang::style::reset; return out; } -} +} // namespace BTB::Logger |
