Small cleanup
This commit is contained in:
@@ -232,7 +232,7 @@ Response::writeJSON(std::ostream& os)
|
|||||||
{
|
{
|
||||||
Json::Object res;
|
Json::Object res;
|
||||||
|
|
||||||
auto valueToJsonValue {[](const Node::Value& value) -> Json::Value
|
auto valueToJsonValue {[](const Node::ValueType& value) -> Json::Value
|
||||||
{
|
{
|
||||||
if (std::holds_alternative<std::string>(value))
|
if (std::holds_alternative<std::string>(value))
|
||||||
return Json::Value {std::get<std::string>(value)};
|
return Json::Value {std::get<std::string>(value)};
|
||||||
|
|||||||
@@ -206,9 +206,9 @@ class Response
|
|||||||
void setVersionAttribute(ProtocolVersion version);
|
void setVersionAttribute(ProtocolVersion version);
|
||||||
|
|
||||||
friend class Response;
|
friend class Response;
|
||||||
using Value = std::variant<std::string, bool, long long>;
|
using ValueType = std::variant<std::string, bool, long long>;
|
||||||
std::map<std::string, Value> _attributes;
|
std::map<std::string, ValueType> _attributes;
|
||||||
std::optional<Value> _value;
|
std::optional<ValueType> _value;
|
||||||
std::map<std::string, std::vector<Node>> _children;
|
std::map<std::string, std::vector<Node>> _children;
|
||||||
std::map<std::string, std::vector<Node>> _childrenArrays;
|
std::map<std::string, std::vector<Node>> _childrenArrays;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user