Update .clang-format to update the comment, macro and assignment formatting

This commit is contained in:
Maschell 2022-02-03 15:51:47 +01:00
parent 6db316c682
commit cd18ab16a6
7 changed files with 99 additions and 101 deletions

View File

@ -2,7 +2,8 @@
BasedOnStyle: LLVM BasedOnStyle: LLVM
AccessModifierOffset: -4 AccessModifierOffset: -4
AlignAfterOpenBracket: Align AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None AlignConsecutiveAssignments: Consecutive
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
AlignOperands: Align AlignOperands: Align
AllowAllArgumentsOnNextLine: false AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false AllowAllConstructorInitializersOnNextLine: false
@ -56,7 +57,7 @@ SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0 SpacesBeforeTrailingComments: 1
SpacesInAngles: false SpacesInAngles: false
SpacesInCStyleCastParentheses: false SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false SpacesInContainerLiterals: false

View File

@ -7,7 +7,7 @@
uint32_t moduleLogInit = false; uint32_t moduleLogInit = false;
uint32_t cafeLogInit = false; uint32_t cafeLogInit = false;
uint32_t udpLogInit = false; uint32_t udpLogInit = false;
#endif// DEBUG #endif // DEBUG
void initLogging() { void initLogging() {
#ifdef DEBUG #ifdef DEBUG
@ -15,7 +15,7 @@ void initLogging() {
cafeLogInit = WHBLogCafeInit(); cafeLogInit = WHBLogCafeInit();
udpLogInit = WHBLogUdpInit(); udpLogInit = WHBLogUdpInit();
} }
#endif// DEBUG #endif // DEBUG
} }
void deinitLogging() { void deinitLogging() {
@ -32,5 +32,5 @@ void deinitLogging() {
WHBLogUdpDeinit(); WHBLogUdpDeinit();
udpLogInit = false; udpLogInit = false;
} }
#endif// DEBUG #endif // DEBUG
} }

View File

@ -31,14 +31,13 @@ typedef struct _memory_mapping_t {
const memory_values_t *physical_addresses; const memory_values_t *physical_addresses;
} memory_mapping_t; } memory_mapping_t;
// clang-format off
#define SEGMENT_UNIQUE_ID 0x00AABBCC // Unique ID. Chosen arbitrary. #define SEGMENT_UNIQUE_ID 0x00AABBCC // Unique ID. Chosen arbitrary.
#define PAGE_INDEX_SHIFT (32-15) #define PAGE_INDEX_SHIFT (32 - 15)
#define PAGE_INDEX_MASK ((1 << (28 - PAGE_INDEX_SHIFT)) - 1) #define PAGE_INDEX_MASK ((1 << (28 - PAGE_INDEX_SHIFT)) - 1)
#define MEMORY_START_BASE 0x80000000 #define MEMORY_START_BASE 0x80000000
#define MEMORY_START_VIDEO_BASE (MEMORY_START_BASE + 0x08000000) #define MEMORY_START_VIDEO_BASE (MEMORY_START_BASE + 0x08000000)
// clang-format on
// clang-format off // clang-format off
const memory_values_t mem_vals_heap_1[] = { const memory_values_t mem_vals_heap_1[] = {
@ -118,10 +117,8 @@ const memory_values_t mem_vals_video[] = {
}; };
// clang-format on // clang-format on
// clang-format off
#define MEMORY_START_VIDEO MEMORY_START_VIDEO_BASE #define MEMORY_START_VIDEO MEMORY_START_VIDEO_BASE
#define MEMORY_END_VIDEO (MEMORY_START_VIDEO + 0xE60000) #define MEMORY_END_VIDEO (MEMORY_START_VIDEO + 0xE60000)
// clang-format on
// clang-format off // clang-format off
const memory_mapping_t mem_mapping[] = { const memory_mapping_t mem_mapping[] = {