mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 09:41:33 +00:00
commit
528fc5870a
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue