mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +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:
@@ -26,10 +26,8 @@ static bool joySticksInitialized = false;
|
||||
* @param port The port on the driver station that the joystick is plugged into.
|
||||
*/
|
||||
Joystick::Joystick(uint32_t port)
|
||||
: m_port (port)
|
||||
: Joystick(port, kNumAxisTypes, kNumButtonTypes)
|
||||
{
|
||||
InitJoystick(kNumAxisTypes, kNumButtonTypes);
|
||||
|
||||
m_axes[kXAxis] = kDefaultXAxis;
|
||||
m_axes[kYAxis] = kDefaultYAxis;
|
||||
m_axes[kZAxis] = kDefaultZAxis;
|
||||
@@ -52,11 +50,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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user