mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-16 23:27:17 +02:00
Minor improvements
This commit is contained in:
parent
07ac53732b
commit
ad385f9ec4
1 changed files with 3 additions and 3 deletions
|
@ -150,7 +150,7 @@ public:
|
||||||
AbstractSetting * setting;
|
AbstractSetting * setting;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<std::string, SettingData> Settings;
|
using Settings = std::map<std::string, SettingData>;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ std::ostream & operator <<(std::ostream & str, const BaseSetting<T> & opt)
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool operator ==(const T & v1, const BaseSetting<T> & v2) { return v1 == (const T &) v2; }
|
bool operator ==(const T & v1, const BaseSetting<T> & v2) { return v1 == static_cast<const T &>(v2); }
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class Setting : public BaseSetting<T>
|
class Setting : public BaseSetting<T>
|
||||||
|
@ -329,7 +329,7 @@ public:
|
||||||
const std::set<std::string> & aliases = {},
|
const std::set<std::string> & aliases = {},
|
||||||
const bool documentDefault = true,
|
const bool documentDefault = true,
|
||||||
std::optional<ExperimentalFeature> experimentalFeature = std::nullopt)
|
std::optional<ExperimentalFeature> experimentalFeature = std::nullopt)
|
||||||
: BaseSetting<T>(def, documentDefault, name, description, aliases, experimentalFeature)
|
: BaseSetting<T>(def, documentDefault, name, description, aliases, std::move(experimentalFeature))
|
||||||
{
|
{
|
||||||
options->addSetting(this);
|
options->addSetting(this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue