Skip to content

Commit

Permalink
Merge pull request #2804 from elsid/fix_warnings
Browse files Browse the repository at this point in the history
Fix warnings
  • Loading branch information
akortunov authored Apr 25, 2020
2 parents cf812d4 + ffacc30 commit 528fc58
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/openmw/mwgui/loadingscreen.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "loadingscreen.hpp"

#include <array>

#include <osgViewer/Viewer>

#include <osg/Texture2D>
Expand Down Expand Up @@ -67,7 +69,7 @@ namespace MWGui
mVFS->normalizeFilename(pattern);

/* priority given to the left */
std::list<std::string> supported_extensions = {".tga", ".dds", ".ktx", ".png", ".bmp", ".jpeg", ".jpg"};
const std::array<std::string, 7> supported_extensions {{".tga", ".dds", ".ktx", ".png", ".bmp", ".jpeg", ".jpg"}};

auto found = index.lower_bound(pattern);
while (found != index.end())
Expand All @@ -78,7 +80,7 @@ namespace MWGui
size_t pos = name.find_last_of('.');
if (pos != std::string::npos)
{
for(auto const extension: supported_extensions)
for(auto const& extension: supported_extensions)
{
if (name.compare(pos, name.size() - pos, extension) == 0)
{
Expand Down

0 comments on commit 528fc58

Please sign in to comment.