mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
clang-tidy: google-explicit-constructor
This commit is contained in:
@@ -65,8 +65,9 @@ class SerialPort : public ErrorBase {
|
||||
* @param stopBits The number of stop bits to use as defined by the enum
|
||||
* StopBits.
|
||||
*/
|
||||
SerialPort(int baudRate, Port port = kOnboard, int dataBits = 8,
|
||||
Parity parity = kParity_None, StopBits stopBits = kStopBits_One);
|
||||
explicit SerialPort(int baudRate, Port port = kOnboard, int dataBits = 8,
|
||||
Parity parity = kParity_None,
|
||||
StopBits stopBits = kStopBits_One);
|
||||
|
||||
/**
|
||||
* Create an instance of a Serial Port class.
|
||||
|
||||
@@ -36,8 +36,9 @@ class LinearSystemSim {
|
||||
* @param system The system to simulate.
|
||||
* @param measurementStdDevs The standard deviations of the measurements.
|
||||
*/
|
||||
LinearSystemSim(const LinearSystem<States, Inputs, Outputs>& system,
|
||||
const std::array<double, Outputs>& measurementStdDevs = {})
|
||||
explicit LinearSystemSim(
|
||||
const LinearSystem<States, Inputs, Outputs>& system,
|
||||
const std::array<double, Outputs>& measurementStdDevs = {})
|
||||
: m_plant(system), m_measurementStdDevs(measurementStdDevs) {
|
||||
m_x = Eigen::Matrix<double, States, 1>::Zero();
|
||||
m_y = Eigen::Matrix<double, Outputs, 1>::Zero();
|
||||
|
||||
@@ -34,12 +34,12 @@ class Color8Bit {
|
||||
*
|
||||
* @param color The color
|
||||
*/
|
||||
constexpr Color8Bit(const Color& color)
|
||||
constexpr Color8Bit(const Color& color) // NOLINT
|
||||
: red(color.red * 255),
|
||||
green(color.green * 255),
|
||||
blue(color.blue * 255) {}
|
||||
|
||||
constexpr operator Color() const {
|
||||
constexpr operator Color() const { // NOLINT
|
||||
return Color(red / 255.0, green / 255.0, blue / 255.0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user