From 7d8728819e01a4d59a0de9c520c94800f87fd617 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Thu, 18 May 2023 17:24:17 +0300 Subject: [PATCH] Minor .clang-format changes and apply to logger.h --- .clang-format | 1 + app/src/main/cpp/baresip.c | 2 +- app/src/main/cpp/logger.h | 21 +++++++++++---------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.clang-format b/.clang-format index 179ee39e..a9e11e38 100644 --- a/.clang-format +++ b/.clang-format @@ -56,6 +56,7 @@ IncludeCategories: IndentCaseLabels: true IndentWidth: 4 IndentWrappedFunctionNames: false +IndentPPDirectives: BeforeHash KeepEmptyLinesAtTheStartOfBlocks: true MacroBlockBegin: '' MacroBlockEnd: '' diff --git a/app/src/main/cpp/baresip.c b/app/src/main/cpp/baresip.c index 62637f6d..2f3a6926 100644 --- a/app/src/main/cpp/baresip.c +++ b/app/src/main/cpp/baresip.c @@ -8,7 +8,7 @@ #include "logger.h" #if defined(__ARM_ARCH_7A__) -#define long long long + #define long long long #endif enum diff --git a/app/src/main/cpp/logger.h b/app/src/main/cpp/logger.h index b636d711..cd582e6d 100644 --- a/app/src/main/cpp/logger.h +++ b/app/src/main/cpp/logger.h @@ -2,24 +2,25 @@ #include #ifndef BARESIP_LOGGER_H -#define BARESIP_LOGGER_H -#define LOG_TAG "Baresip Lib" + #define BARESIP_LOGGER_H -#define LOGD(...) \ - if (log_level_get() < LEVEL_INFO) \ + #define LOG_TAG "Baresip Lib" + + #define LOGD(...) \ + if (log_level_get() < LEVEL_INFO) \ ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)) -#define LOGI(...) \ - if (log_level_get() < LEVEL_WARN) \ + #define LOGI(...) \ + if (log_level_get() < LEVEL_WARN) \ ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)) -#define LOGW(...) \ - if (log_level_get() < LEVEL_ERROR) \ + #define LOGW(...) \ + if (log_level_get() < LEVEL_ERROR) \ ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)) -#define LOGE(...) \ - if (log_level_get() <= LEVEL_ERROR) \ + #define LOGE(...) \ + if (log_level_get() <= LEVEL_ERROR) \ ((void)__android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)) #endif //BARESIP_LOGGER_H