aboutsummaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/settings.h b/src/settings.h
index 2b46676c6..addd9980c 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -569,6 +569,12 @@ public:
return value;
}
+ u32 getFlagStr(std::string name, FlagDesc *flagdesc)
+ {
+ std::string val = get(name);
+ return (isdigit(val[0])) ? stoi(val) : readFlagString(val, flagdesc);
+ }
+
template <class T> T *getStruct(std::string name, std::string format)
{
size_t len = sizeof(T);
@@ -831,6 +837,11 @@ fail:
set(name, std::string(sbuf));
return true;
}
+
+ void setFlagStr(std::string name, u32 flags, FlagDesc *flagdesc)
+ {
+ set(name, writeFlagString(flags, flagdesc));
+ }
void setBool(std::string name, bool value)
{