In the following function `JoystickImpl::getDeviceName()`, there are loads of variables declared before being initialized; you could postpone their declaration until you need them.