1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Add additional constructor to JsonNode from const char *

Fixes an issue where due to implicit conversion JsonNode(bool) will be
called instead of expected JsonNode(std::string)
This commit is contained in:
Ivan Savenko
2024-02-29 17:33:00 +02:00
parent 850af00303
commit d5a96a122a
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)
{