mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
artf4107: Removed most "Init" functions from classes
They were either replaced with delegating constructors or merged into the only constructor in the class. Change-Id: I3d35139f6ab23c719433a9f76942b02a3b07ddac
This commit is contained in:
@@ -30,9 +30,7 @@ static bool joySticksInitialized = false;
|
||||
* (0-5).
|
||||
*/
|
||||
Joystick::Joystick(uint32_t port)
|
||||
: m_port(port) {
|
||||
InitJoystick(kNumAxisTypes, kNumButtonTypes);
|
||||
|
||||
: Joystick(port, kNumAxisTypes, kNumButtonTypes) {
|
||||
m_axes[kXAxis] = kDefaultXAxis;
|
||||
m_axes[kYAxis] = kDefaultYAxis;
|
||||
m_axes[kZAxis] = kDefaultZAxis;
|
||||
@@ -58,10 +56,6 @@ Joystick::Joystick(uint32_t port)
|
||||
Joystick::Joystick(uint32_t port, uint32_t numAxisTypes,
|
||||
uint32_t numButtonTypes)
|
||||
: m_port(port) {
|
||||
InitJoystick(numAxisTypes, numButtonTypes);
|
||||
}
|
||||
|
||||
void Joystick::InitJoystick(uint32_t numAxisTypes, uint32_t numButtonTypes) {
|
||||
if (!joySticksInitialized) {
|
||||
for (auto& joystick : joysticks) joystick = nullptr;
|
||||
joySticksInitialized = true;
|
||||
|
||||
Reference in New Issue
Block a user