mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Finish clang-tidy cleanups (#3003)
* Add .clang-tidy configuration. * A separate .clang-tidy is used for hal includes to suppress modernize-use-using (as these are C headers). * Add NOLINT where necessary for a clean run. * Add clang-tidy job to lint-format workflow. This workflow is now only run on PRs. To reduce runtime, clang-tidy is only run on files changed in the PR. Two wpilibc changes; both are unlikely to break user code: * BuiltInAccelerometer: Make SetRange() final * Counter: Make SetMaxPeriod() final After these cleanups, the only file that does not run cleanly is cscore_raw_cv.h due to it not being standalone.
This commit is contained in:
@@ -6,11 +6,10 @@
|
||||
|
||||
#include <atomic>
|
||||
|
||||
namespace hal {
|
||||
namespace init {
|
||||
namespace hal::init {
|
||||
extern std::atomic_bool HAL_IsInitialized;
|
||||
extern void RunInitialize();
|
||||
static inline void CheckInit() {
|
||||
inline void CheckInit() {
|
||||
if (HAL_IsInitialized.load(std::memory_order_relaxed)) {
|
||||
return;
|
||||
}
|
||||
@@ -52,5 +51,4 @@ extern void InitializeSerialPort();
|
||||
extern void InitializeSolenoid();
|
||||
extern void InitializeSPI();
|
||||
extern void InitializeThreads();
|
||||
} // namespace init
|
||||
} // namespace hal
|
||||
} // namespace hal::init
|
||||
|
||||
@@ -155,7 +155,7 @@ void SerialHelper::CoiteratedSort(
|
||||
}
|
||||
}
|
||||
}
|
||||
vec = sortedVec;
|
||||
vec.swap(sortedVec);
|
||||
}
|
||||
|
||||
void SerialHelper::QueryHubPaths(int32_t* status) {
|
||||
|
||||
Reference in New Issue
Block a user