forked from kothiga/hri-physio
-
Notifications
You must be signed in to change notification settings - Fork 0
Following C Core Guidelines in Processing Module
Prachi Sheth edited this page Jan 16, 2025
·
2 revisions
biquadratic.cpp
Some of the C++ core guidelines that are followed in biquadratic.cpp
are :
- The use of
std::vector
instead of raw pointers helps. Resource.1 - All member variables (a0, a1, a2, b1, b2) are initialized in the constructor to prevent undefined behavior. Philosophy.2
- The functions like filter, setSamplingRate, and setBandWidth are clearly defined. Function.1
Clang-Tidy Test -
butterworthBandNoch.cpp
C++ core guidelines that are followed in butterworthBandNoch.cpp
are :
-
hriPhysio::Processing::pi
should ideally be declared asconstexpr
so you can’t change the value by mistake. Expressions and statements.25
Clang-Tidy Test(Before) -
Clang-Tidy Test(After) -