Clang formatter: add indent to wrapped functions names. (#548)

This commit is contained in:
あく 2021-07-01 03:45:20 +03:00 committed by GitHub
parent a0e1e42f2d
commit 8211432685
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 24 additions and 15 deletions

View File

@ -41,7 +41,7 @@ IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false IndentCaseLabels: false
IndentPPDirectives: None IndentPPDirectives: None
IndentWidth: 4 IndentWidth: 4
IndentWrappedFunctionNames: false IndentWrappedFunctionNames: true
JavaScriptQuotes: Leave JavaScriptQuotes: Leave
JavaScriptWrapImports: true JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false KeepEmptyLinesAtTheStartOfBlocks: false

View File

@ -15,8 +15,10 @@ public:
private: private:
static bool DoWiegandConversion(); static bool DoWiegandConversion();
static unsigned long static unsigned long GetCardId(
GetCardId(volatile unsigned long* codehigh, volatile unsigned long* codelow, char bitlength); volatile unsigned long* codehigh,
volatile unsigned long* codelow,
char bitlength);
static volatile unsigned long _cardTempHigh; static volatile unsigned long _cardTempHigh;
static volatile unsigned long _cardTemp; static volatile unsigned long _cardTemp;

View File

@ -11,7 +11,7 @@ std::unique_ptr<IrdaAppFileParser::IrdaFileMessage> IrdaAppFileParser::read_mess
} }
std::unique_ptr<IrdaAppFileParser::IrdaFileMessage> std::unique_ptr<IrdaAppFileParser::IrdaFileMessage>
IrdaAppFileParser::parse_message(const std::string& str) const { IrdaAppFileParser::parse_message(const std::string& str) const {
char protocol_name[32]; char protocol_name[32];
uint32_t address; uint32_t address;
uint32_t command; uint32_t command;

View File

@ -21,7 +21,7 @@ static bool find_string(const std::vector<std::string>& strings, const std::stri
} }
static std::string static std::string
find_vacant_name(const std::vector<std::string>& strings, const std::string& name) { find_vacant_name(const std::vector<std::string>& strings, const std::string& name) {
// if suggested name is occupied, try another one (name2, name3, etc) // if suggested name is occupied, try another one (name2, name3, etc)
if(find_string(strings, name)) { if(find_string(strings, name)) {
int i = 1; int i = 1;

View File

@ -37,8 +37,11 @@ MenuItem* menu_item_alloc_menu(const char* label, Icon* icon) {
return menu_item; return menu_item;
} }
MenuItem* MenuItem* menu_item_alloc_function(
menu_item_alloc_function(const char* label, Icon* icon, MenuItemCallback callback, void* context) { const char* label,
Icon* icon,
MenuItemCallback callback,
void* context) {
MenuItem* menu_item = menu_item_alloc(); MenuItem* menu_item = menu_item_alloc();
menu_item->type = MenuItemTypeFunction; menu_item->type = MenuItemTypeFunction;

View File

@ -16,8 +16,11 @@ ARRAY_DEF(MenuItemArray, MenuItem*, M_PTR_OPLIST);
MenuItem* menu_item_alloc_menu(const char* label, Icon* icon); MenuItem* menu_item_alloc_menu(const char* label, Icon* icon);
MenuItem* MenuItem* menu_item_alloc_function(
menu_item_alloc_function(const char* label, Icon* icon, MenuItemCallback callback, void* context); const char* label,
Icon* icon,
MenuItemCallback callback,
void* context);
void menu_item_release(MenuItem* menu_item); void menu_item_release(MenuItem* menu_item);

View File

@ -71,7 +71,7 @@ public:
void free_benchmark_data(); void free_benchmark_data();
void write_benchmark(); void write_benchmark();
uint32_t uint32_t
write_benchmark_internal(const uint32_t size, const uint32_t tcount, bool silent = false); write_benchmark_internal(const uint32_t size, const uint32_t tcount, bool silent = false);
void read_benchmark(); void read_benchmark();
uint32_t read_benchmark_internal( uint32_t read_benchmark_internal(

View File

@ -473,7 +473,7 @@ bool fs_dir_rewind(File* file) {
// Get info about file/dir // Get info about file/dir
FS_Error FS_Error
fs_common_info(const char* path, FileInfo* fileinfo, char* name, const uint16_t name_length) { fs_common_info(const char* path, FileInfo* fileinfo, char* name, const uint16_t name_length) {
SDFileInfo _fileinfo; SDFileInfo _fileinfo;
SDError fresult = _fs_status(fs_info); SDError fresult = _fs_status(fs_info);

View File

@ -132,7 +132,7 @@ bool fs_dir_rewind(File* file);
/* common api */ /* common api */
FS_Error FS_Error
fs_common_info(const char* path, FileInfo* fileinfo, char* name, const uint16_t name_length); fs_common_info(const char* path, FileInfo* fileinfo, char* name, const uint16_t name_length);
FS_Error fs_common_remove(const char* path); FS_Error fs_common_remove(const char* path);
FS_Error fs_common_rename(const char* old_path, const char* new_path); FS_Error fs_common_rename(const char* old_path, const char* new_path);
FS_Error fs_common_set_attr(const char* path, uint8_t attr, uint8_t mask); FS_Error fs_common_set_attr(const char* path, uint8_t attr, uint8_t mask);

View File

@ -18,8 +18,9 @@ static void test_teardown(void) {
irda_free_decoder(decoder); irda_free_decoder(decoder);
} }
static void static void compare_message_results(
compare_message_results(const IrdaMessage* message_decoded, const IrdaMessage* message_expected) { const IrdaMessage* message_decoded,
const IrdaMessage* message_expected) {
mu_check(message_decoded->protocol == message_expected->protocol); mu_check(message_decoded->protocol == message_expected->protocol);
mu_check(message_decoded->command == message_expected->command); mu_check(message_decoded->command == message_expected->command);
mu_check(message_decoded->address == message_expected->address); mu_check(message_decoded->address == message_expected->address);

View File

@ -31,7 +31,7 @@ bool spi_xfer(
Blocking verison: Blocking verison:
*/ */
static inline bool static inline bool
spi_xfer_block(SPI_HandleTypeDef* spi, uint8_t* tx_data, uint8_t* rx_data, size_t len) { spi_xfer_block(SPI_HandleTypeDef* spi, uint8_t* tx_data, uint8_t* rx_data, size_t len) {
semaphoreInfo s; semaphoreInfo s;
osSemaphore block = createSemaphoreStatic(s); osSemaphore block = createSemaphoreStatic(s);
if(!spi_xfer(spi, tx_data, rx_data, len, RELEASE_SEMAPHORE, (void*)block)) { if(!spi_xfer(spi, tx_data, rx_data, len, RELEASE_SEMAPHORE, (void*)block)) {