Added another preference helper.

This commit is contained in:
Guillaume Melquiond 2010-07-24 08:47:59 +00:00
parent 24d4fb8b04
commit 751e99354b
2 changed files with 6 additions and 0 deletions

View file

@ -102,6 +102,11 @@ void set(const std::string &key, bool value)
prefs[key] = value;
}
void set(const std::string &key, int value)
{
prefs[key] = value;
}
void set(const std::string &key, char const *value)
{
prefs[key] = value;

View file

@ -41,6 +41,7 @@ namespace preferences {
void set(const std::string& key, const std::string &value);
void set(const std::string& key, char const *value);
void set(const std::string &key, bool value);
void set(const std::string &key, int value);
void clear(const std::string& key);
void set_child(const std::string& key, const config& val);
const config &get_child(const std::string &key);