1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-17 13:41:07 +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:
Ivan Savenko 2024-02-29 19:22:14 +02:00 committed by GitHub
commit ce44f581fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -76,6 +76,11 @@ JsonNode::JsonNode(double number)
{
}
JsonNode::JsonNode(const char * string)
: data(std::string(string))
{
}
JsonNode::JsonNode(const std::string & string)
: data(string)
{

View File

@ -68,6 +68,7 @@ public:
explicit JsonNode(uint32_t number);
explicit JsonNode(int64_t number);
explicit JsonNode(double number);
explicit JsonNode(const char * string);
explicit JsonNode(const std::string & string);
/// Create tree from Json-formatted input