1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-20 16:41:33 +00:00

Merge pull request #2804 from elsid/fix_warnings

Fix warnings
This commit is contained in:
Andrei Kortunov 2020-04-25 08:25:13 +04:00 committed by GitHub
commit 528fc5870a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,7 @@
#include "loadingscreen.hpp" #include "loadingscreen.hpp"
#include <array>
#include <osgViewer/Viewer> #include <osgViewer/Viewer>
#include <osg/Texture2D> #include <osg/Texture2D>
@ -67,7 +69,7 @@ namespace MWGui
mVFS->normalizeFilename(pattern); mVFS->normalizeFilename(pattern);
/* priority given to the left */ /* 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); auto found = index.lower_bound(pattern);
while (found != index.end()) while (found != index.end())
@ -78,7 +80,7 @@ namespace MWGui
size_t pos = name.find_last_of('.'); size_t pos = name.find_last_of('.');
if (pos != std::string::npos) 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) if (name.compare(pos, name.size() - pos, extension) == 0)
{ {