Use 'shrink_to_fit' instead of 'swap'

This commit is contained in:
Vittorio Romeo 2021-12-08 14:55:31 +00:00
parent 3914bd0062
commit f87f5a3f72

View File

@ -772,9 +772,7 @@ bool JoystickImpl::openDInput(unsigned int index)
entry.productId = m_identification.productId; entry.productId = m_identification.productId;
joystickBlacklist.push_back(entry); joystickBlacklist.push_back(entry);
joystickBlacklist.shrink_to_fit();
// Pre-C++11 shrink_to_fit()
JoystickBlacklist(joystickBlacklist.begin(), joystickBlacklist.end()).swap(joystickBlacklist);
} }
m_device->Release(); m_device->Release();