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

@@ -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;