mirror of
https://github.com/OpenMW/openmw.git
synced 2025-07-06 08:11:35 +00:00
To make sure loaded settings have valid values doing the check once per loading. And to make access more efficient.
33 lines
536 B
C++
33 lines
536 B
C++
#ifndef OPENMW_COMPONENTS_SETTINGS_VALUES_H
|
|
#define OPENMW_COMPONENTS_SETTINGS_VALUES_H
|
|
|
|
#include "sanitizerimpl.hpp"
|
|
#include "settingvalue.hpp"
|
|
|
|
namespace Settings
|
|
{
|
|
class Values
|
|
{
|
|
public:
|
|
static void init();
|
|
|
|
private:
|
|
static Values* sValues;
|
|
|
|
friend const Values& values();
|
|
|
|
friend Values& valuesMutable();
|
|
};
|
|
|
|
inline const Values& values()
|
|
{
|
|
return *Values::sValues;
|
|
}
|
|
|
|
inline Values& valuesMutable()
|
|
{
|
|
return *Values::sValues;
|
|
}
|
|
}
|
|
|
|
#endif
|