1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 03:29:55 +00:00

Do not copy a static string

This commit is contained in:
Andrei Kortunov 2023-09-04 10:20:58 +04:00
parent 5faf56950b
commit fae9ced5f9
2 changed files with 5 additions and 5 deletions

View file

@ -7,6 +7,8 @@
namespace fx
{
std::string StateUpdater::sDefinition = UniformData::getDefinition("_omw_data");
StateUpdater::StateUpdater(bool useUBO)
: mUseUBO(useUBO)
{

View file

@ -100,11 +100,7 @@ namespace fx
mPointLightBuffer = std::move(buffer);
}
static std::string getStructDefinition()
{
static std::string definition = UniformData::getDefinition("_omw_data");
return definition;
}
static const std::string& getStructDefinition() { return sDefinition; }
void setDefaults(osg::StateSet* stateset) override;
@ -275,6 +271,8 @@ namespace fx
UniformData mData;
bool mUseUBO;
static std::string sDefinition;
std::shared_ptr<SceneUtil::PPLightBuffer> mPointLightBuffer;
};
}