mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-05 06:40:09 +00:00
s p a n
This commit is contained in:
parent
1717e696b1
commit
6406095bfb
@ -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…
x
Reference in New Issue
Block a user