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
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
IndentWrappedFunctionNames: true
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false

View File

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

View File

@ -11,7 +11,7 @@ std::unique_ptr<IrdaAppFileParser::IrdaFileMessage> IrdaAppFileParser::read_mess
}
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];
uint32_t address;
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
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(find_string(strings, name)) {
int i = 1;

View File

@ -37,8 +37,11 @@ MenuItem* menu_item_alloc_menu(const char* label, Icon* icon) {
return menu_item;
}
MenuItem*
menu_item_alloc_function(const char* label, Icon* icon, MenuItemCallback callback, void* context) {
MenuItem* menu_item_alloc_function(
const char* label,
Icon* icon,
MenuItemCallback callback,
void* context) {
MenuItem* menu_item = menu_item_alloc();
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_function(const char* label, Icon* icon, MenuItemCallback callback, void* context);
MenuItem* menu_item_alloc_function(
const char* label,
Icon* icon,
MenuItemCallback callback,
void* context);
void menu_item_release(MenuItem* menu_item);

View File

@ -71,7 +71,7 @@ public:
void free_benchmark_data();
void write_benchmark();
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();
uint32_t read_benchmark_internal(

View File

@ -473,7 +473,7 @@ bool fs_dir_rewind(File* file) {
// Get info about file/dir
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;
SDError fresult = _fs_status(fs_info);

View File

@ -132,7 +132,7 @@ bool fs_dir_rewind(File* file);
/* common api */
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_rename(const char* old_path, const char* new_path);
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);
}
static void
compare_message_results(const IrdaMessage* message_decoded, const IrdaMessage* message_expected) {
static void compare_message_results(
const IrdaMessage* message_decoded,
const IrdaMessage* message_expected) {
mu_check(message_decoded->protocol == message_expected->protocol);
mu_check(message_decoded->command == message_expected->command);
mu_check(message_decoded->address == message_expected->address);

View File

@ -31,7 +31,7 @@ bool spi_xfer(
Blocking verison:
*/
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;
osSemaphore block = createSemaphoreStatic(s);
if(!spi_xfer(spi, tx_data, rx_data, len, RELEASE_SEMAPHORE, (void*)block)) {