mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-18 04:10:06 +00:00
Use std::array for a list of extensions
This list doesn't change and the size is known at compile time.
This commit is contained in:
parent
975e4f9908
commit
ffacc30597
@ -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())
|
||||||
|
Loading…
Reference in New Issue
Block a user