mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-13 01:36:15 +02:00
Make toJSONObject const
This commit is contained in:
parent
ad385f9ec4
commit
f404e9b3b3
3 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
std::map<std::string, nlohmann::json> BaseSetting<T>::toJSONObject()
|
std::map<std::string, nlohmann::json> BaseSetting<T>::toJSONObject() const
|
||||||
{
|
{
|
||||||
auto obj = AbstractSetting::toJSONObject();
|
auto obj = AbstractSetting::toJSONObject();
|
||||||
obj.emplace("value", value);
|
obj.emplace("value", value);
|
||||||
|
|
|
@ -221,7 +221,7 @@ nlohmann::json AbstractSetting::toJSON()
|
||||||
return nlohmann::json(toJSONObject());
|
return nlohmann::json(toJSONObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map<std::string, nlohmann::json> AbstractSetting::toJSONObject()
|
std::map<std::string, nlohmann::json> AbstractSetting::toJSONObject() const
|
||||||
{
|
{
|
||||||
std::map<std::string, nlohmann::json> obj;
|
std::map<std::string, nlohmann::json> obj;
|
||||||
obj.emplace("description", description);
|
obj.emplace("description", description);
|
||||||
|
|
|
@ -213,7 +213,7 @@ protected:
|
||||||
|
|
||||||
nlohmann::json toJSON();
|
nlohmann::json toJSON();
|
||||||
|
|
||||||
virtual std::map<std::string, nlohmann::json> toJSONObject();
|
virtual std::map<std::string, nlohmann::json> toJSONObject() const;
|
||||||
|
|
||||||
virtual void convertToArg(Args & args, const std::string & category);
|
virtual void convertToArg(Args & args, const std::string & category);
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ public:
|
||||||
|
|
||||||
void convertToArg(Args & args, const std::string & category) override;
|
void convertToArg(Args & args, const std::string & category) override;
|
||||||
|
|
||||||
std::map<std::string, nlohmann::json> toJSONObject() override;
|
std::map<std::string, nlohmann::json> toJSONObject() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
Loading…
Reference in a new issue