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:
Tyler Veness
2015-06-29 02:43:44 -07:00
parent e4a8aacc51
commit 1ab3ea670d
62 changed files with 258 additions and 525 deletions

View File

@@ -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 )
{