mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-19 19:10:20 +02:00
Merge pull request #3648 from IvanSavenko/fix_json_from_const_char
Add additional constructor to JsonNode from const char *
This commit is contained in:
commit
ce44f581fb
@ -76,6 +76,11 @@ JsonNode::JsonNode(double number)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JsonNode::JsonNode(const char * string)
|
||||||
|
: data(std::string(string))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
JsonNode::JsonNode(const std::string & string)
|
JsonNode::JsonNode(const std::string & string)
|
||||||
: data(string)
|
: data(string)
|
||||||
{
|
{
|
||||||
|
@ -68,6 +68,7 @@ public:
|
|||||||
explicit JsonNode(uint32_t number);
|
explicit JsonNode(uint32_t number);
|
||||||
explicit JsonNode(int64_t number);
|
explicit JsonNode(int64_t number);
|
||||||
explicit JsonNode(double number);
|
explicit JsonNode(double number);
|
||||||
|
explicit JsonNode(const char * string);
|
||||||
explicit JsonNode(const std::string & string);
|
explicit JsonNode(const std::string & string);
|
||||||
|
|
||||||
/// Create tree from Json-formatted input
|
/// Create tree from Json-formatted input
|
||||||
|
Loading…
x
Reference in New Issue
Block a user