1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 01:15:35 +00:00

Use raw string literal for error marker definition

This commit is contained in:
elsid 2022-09-12 15:03:34 +02:00
parent 6ae15f08e0
commit 409f83a149
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625
6 changed files with 1418 additions and 1405 deletions

View file

@ -50,7 +50,7 @@ add_component_dir (vfs
add_component_dir (resource
scenemanager keyframemanager imagemanager bulletshapemanager bulletshape niffilemanager objectcache multiobjectcache resourcesystem
resourcemanager stats animation foreachbulletobject
resourcemanager stats animation foreachbulletobject errormarker
)
add_component_dir (shader
@ -197,7 +197,7 @@ add_component_dir (esm4
add_component_dir (misc
constants utf8stream resourcehelpers rng messageformatparser weakcache thread
compression osguservalues errorMarker color tuplemeta tuplehelpers
compression osguservalues color tuplemeta tuplehelpers
)
add_component_dir (stereo

File diff suppressed because it is too large Load diff

View file

@ -1,11 +0,0 @@
#ifndef OPENMW_COMPONENTS_MISC_ERRORMARKER_H
#define OPENMW_COMPONENTS_MISC_ERRORMARKER_H
#include <string>
namespace Misc
{
extern const std::string errorMarker;
}
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,14 @@
#ifndef OPENMW_COMPONENTS_RESOURCE_ERRORMARKER_H
#define OPENMW_COMPONENTS_RESOURCE_ERRORMARKER_H
#include <string_view>
namespace Resource
{
struct ErrorMarker
{
static const std::string_view sValue;
};
}
#endif

View file

@ -28,7 +28,6 @@
#include <components/misc/pathhelpers.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/misc/algorithm.hpp>
#include <components/misc/errorMarker.hpp>
#include <components/misc/osguservalues.hpp>
#include <components/vfs/manager.hpp>
@ -53,6 +52,7 @@
#include "imagemanager.hpp"
#include "niffilemanager.hpp"
#include "objectcache.hpp"
#include "errormarker.hpp"
namespace
{
@ -759,7 +759,7 @@ namespace Resource
if (mVFS->exists(normalized))
return load(normalized, mVFS, mImageManager, mNifFileManager);
}
Files::IMemStream file(Misc::errorMarker.data(), Misc::errorMarker.size());
Files::IMemStream file(ErrorMarker::sValue.data(), ErrorMarker::sValue.size());
return loadNonNif("error_marker.osgt", file, mImageManager);
}();