From f87f5a3f72fab11eb72651e0252404c254143545 Mon Sep 17 00:00:00 2001 From: Vittorio Romeo Date: Wed, 8 Dec 2021 14:55:31 +0000 Subject: [PATCH] Use 'shrink_to_fit' instead of 'swap' --- src/SFML/Window/Win32/JoystickImpl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/SFML/Window/Win32/JoystickImpl.cpp b/src/SFML/Window/Win32/JoystickImpl.cpp index 86ac1baa4..e2144cfac 100644 --- a/src/SFML/Window/Win32/JoystickImpl.cpp +++ b/src/SFML/Window/Win32/JoystickImpl.cpp @@ -772,9 +772,7 @@ bool JoystickImpl::openDInput(unsigned int index) entry.productId = m_identification.productId; joystickBlacklist.push_back(entry); - - // Pre-C++11 shrink_to_fit() - JoystickBlacklist(joystickBlacklist.begin(), joystickBlacklist.end()).swap(joystickBlacklist); + joystickBlacklist.shrink_to_fit(); } m_device->Release();