mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Turn loops into range-based form
and some things suggested by cppcheck and compiler warnings.
This commit is contained in:
parent
2ff794d299
commit
404624bf0b
52 changed files with 199 additions and 230 deletions
|
@ -48,7 +48,7 @@ void VideoBackend::PopulateList()
|
|||
#endif
|
||||
g_available_video_backends.push_back(backends[3] = new SW::VideoSoftware);
|
||||
|
||||
for (auto& backend : backends)
|
||||
for (VideoBackend* backend : backends)
|
||||
{
|
||||
if (backend)
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ void VideoBackend::ActivateBackend(const std::string& name)
|
|||
if (name.length() == 0) // If NULL, set it to the default backend (expected behavior)
|
||||
g_video_backend = s_default_backend;
|
||||
|
||||
for (std::vector<VideoBackend*>::const_iterator it = g_available_video_backends.begin(); it != g_available_video_backends.end(); ++it)
|
||||
if (name == (*it)->GetName())
|
||||
g_video_backend = *it;
|
||||
for (VideoBackend* backend : g_available_video_backends)
|
||||
if (name == backend->GetName())
|
||||
g_video_backend = backend;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue