diff --git a/src/SFML/Audio/SoundRecorder.cpp b/src/SFML/Audio/SoundRecorder.cpp index 9de1ad8..d2d06a8 100644 --- a/src/SFML/Audio/SoundRecorder.cpp +++ b/src/SFML/Audio/SoundRecorder.cpp @@ -90,9 +90,9 @@ const char** sfSoundRecorder_getAvailableDevices(size_t* count) if (cstringDevices.empty() && !stringDevices.empty()) { - for (std::vector::const_iterator it = stringDevices.begin(); it != stringDevices.end(); ++it) + for (const auto& stringDevice : stringDevices) { - cstringDevices.push_back(it->c_str()); + cstringDevices.push_back(stringDevice.c_str()); } } diff --git a/src/SFML/Network/FtpStruct.h b/src/SFML/Network/FtpStruct.h index 091aba7..a346b6b 100644 --- a/src/SFML/Network/FtpStruct.h +++ b/src/SFML/Network/FtpStruct.h @@ -81,8 +81,8 @@ struct sfFtpListingResponse ~sfFtpListingResponse() { - for (std::vector::iterator it = Filenames.begin(); it != Filenames.end(); ++it) - delete[] *it; + for (const auto& filename : Filenames) + delete[] filename; } sf::Ftp::ListingResponse This; diff --git a/src/SFML/Window/VideoMode.cpp b/src/SFML/Window/VideoMode.cpp index 0c14a90..dfde215 100644 --- a/src/SFML/Window/VideoMode.cpp +++ b/src/SFML/Window/VideoMode.cpp @@ -51,13 +51,13 @@ const sfVideoMode* sfVideoMode_getFullscreenModes(size_t* count) // Populate the array on first call if (modes.empty()) { - const std::vector& SFMLModes = sf::VideoMode::getFullscreenModes(); - for (std::vector::const_iterator it = SFMLModes.begin(); it != SFMLModes.end(); ++it) + const std::vector& sfmlModes = sf::VideoMode::getFullscreenModes(); + for (const auto& sfmlMode : sfmlModes) { sfVideoMode mode; - mode.width = it->width; - mode.height = it->height; - mode.bitsPerPixel = it->bitsPerPixel; + mode.width = sfmlMode.width; + mode.height = sfmlMode.height; + mode.bitsPerPixel = sfmlMode.bitsPerPixel; modes.push_back(mode); } }