Clang-Tidy fixes (#6725)
This commit is contained in:
parent
c2ce44bead
commit
3c501b963d
184 changed files with 1312 additions and 1154 deletions
|
@ -517,7 +517,6 @@ static SDL_bool JoystickAlreadyKnown(IOHIDDeviceRef ioHIDDeviceObject)
|
|||
static void JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender, IOHIDDeviceRef ioHIDDeviceObject)
|
||||
{
|
||||
recDevice *device;
|
||||
int device_index = 0;
|
||||
io_service_t ioservice;
|
||||
|
||||
if (res != kIOReturnSuccess) {
|
||||
|
@ -568,12 +567,10 @@ static void JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender
|
|||
recDevice *curdevice;
|
||||
|
||||
curdevice = gpDeviceList;
|
||||
while (curdevice->pNext) {
|
||||
++device_index;
|
||||
while (curdevice->pNext != NULL) {
|
||||
curdevice = curdevice->pNext;
|
||||
}
|
||||
curdevice->pNext = device;
|
||||
++device_index; /* bump by one since we counted by pNext. */
|
||||
}
|
||||
|
||||
SDL_PrivateJoystickAdded(device->instance_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue