mirror of
https://github.com/MaJerle/lwbtn.git
synced 2026-02-05 19:56:00 +08:00
Apply clang-tidy
This commit is contained in:
19
.clang-tidy
Normal file
19
.clang-tidy
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
Checks: "*,
|
||||
-abseil-*,
|
||||
-altera-*,
|
||||
-android-*,
|
||||
-fuchsia-*,
|
||||
-google-*,
|
||||
-llvm*,
|
||||
-modernize-use-trailing-return-type,
|
||||
-zircon-*,
|
||||
-readability-else-after-return,
|
||||
-readability-static-accessed-through-instance,
|
||||
-readability-avoid-const-params-in-decls,
|
||||
-cppcoreguidelines-non-private-member-variables-in-classes,
|
||||
-misc-non-private-member-variables-in-classes,
|
||||
"
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
FormatStyle: none
|
||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -12,5 +12,6 @@
|
||||
"bitset": "c",
|
||||
"stdio.h": "c"
|
||||
},
|
||||
"esbonio.sphinx.confDir": ""
|
||||
"esbonio.sphinx.confDir": "",
|
||||
"C_Cpp.codeAnalysis.clangTidy.useBuildPath": true
|
||||
}
|
||||
@@ -52,6 +52,24 @@ extern "C" {
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Memory set function
|
||||
*
|
||||
* \note Function footprint is the same as \ref memset
|
||||
*/
|
||||
#ifndef LWBTN_MEMSET
|
||||
#define LWBTN_MEMSET(dst, val, len) memset((dst), (val), (len))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Memory copy function
|
||||
*
|
||||
* \note Function footprint is the same as \ref memcpy
|
||||
*/
|
||||
#ifndef LWBTN_MEMCPY
|
||||
#define LWBTN_MEMCPY(dst, src, len) memcpy((dst), (src), (len))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Enables `1` or disables `0` periodic keep alive events.
|
||||
*
|
||||
|
||||
@@ -292,7 +292,7 @@ lwbtn_init_ex(lwbtn_t* lwobj, lwbtn_btn_t* btns, uint16_t btns_cnt, lwbtn_get_st
|
||||
return 0;
|
||||
}
|
||||
|
||||
memset(lwobj, 0x00, sizeof(*lwobj));
|
||||
LWBTN_MEMSET(lwobj, 0x00, sizeof(*lwobj));
|
||||
lwobj->btns = btns;
|
||||
lwobj->btns_cnt = btns_cnt;
|
||||
lwobj->evt_fn = evt_fn;
|
||||
|
||||
Reference in New Issue
Block a user