mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 22:36:40 +00:00
s p a n
This commit is contained in:
parent
1717e696b1
commit
6406095bfb
2 changed files with 7 additions and 6 deletions
|
@ -47,7 +47,7 @@ bool Misc::ResourceHelpers::changeExtensionToDds(std::string& path)
|
|||
}
|
||||
|
||||
std::string Misc::ResourceHelpers::correctResourcePath(
|
||||
const std::vector<std::string_view>& topLevelDirectories, std::string_view resPath, const VFS::Manager* vfs)
|
||||
std::span<const std::string_view> topLevelDirectories, std::string_view resPath, const VFS::Manager* vfs)
|
||||
{
|
||||
/* Bethesda at some point converted all their BSA
|
||||
* textures from tga to dds for increased load speed, but all
|
||||
|
@ -124,17 +124,17 @@ std::string Misc::ResourceHelpers::correctResourcePath(
|
|||
|
||||
std::string Misc::ResourceHelpers::correctTexturePath(std::string_view resPath, const VFS::Manager* vfs)
|
||||
{
|
||||
return correctResourcePath({ "textures", "bookart" }, resPath, vfs);
|
||||
return correctResourcePath({ { "textures", "bookart" } }, resPath, vfs);
|
||||
}
|
||||
|
||||
std::string Misc::ResourceHelpers::correctIconPath(std::string_view resPath, const VFS::Manager* vfs)
|
||||
{
|
||||
return correctResourcePath({ "icons" }, resPath, vfs);
|
||||
return correctResourcePath({ { "icons" } }, resPath, vfs);
|
||||
}
|
||||
|
||||
std::string Misc::ResourceHelpers::correctBookartPath(std::string_view resPath, const VFS::Manager* vfs)
|
||||
{
|
||||
return correctResourcePath({ "bookart", "textures" }, resPath, vfs);
|
||||
return correctResourcePath({ { "bookart", "textures" } }, resPath, vfs);
|
||||
}
|
||||
|
||||
std::string Misc::ResourceHelpers::correctBookartPath(
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef MISC_RESOURCEHELPERS_H
|
||||
#define MISC_RESOURCEHELPERS_H
|
||||
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
@ -23,8 +24,8 @@ namespace Misc
|
|||
namespace ResourceHelpers
|
||||
{
|
||||
bool changeExtensionToDds(std::string& path);
|
||||
std::string correctResourcePath(const std::vector<std::string_view>& topLevelDirectories,
|
||||
std::string_view resPath, const VFS::Manager* vfs);
|
||||
std::string correctResourcePath(
|
||||
std::span<const std::string_view> topLevelDirectories, std::string_view resPath, const VFS::Manager* vfs);
|
||||
std::string correctTexturePath(std::string_view resPath, const VFS::Manager* vfs);
|
||||
std::string correctIconPath(std::string_view resPath, const VFS::Manager* vfs);
|
||||
std::string correctBookartPath(std::string_view resPath, const VFS::Manager* vfs);
|
||||
|
|
Loading…
Reference in a new issue