vcpkg/ports/json-schema-validator/fix-ambiguous-assignment.patch
Ankush Singh 31aea25728
[json-schema-validator] Add new port (#11599)
* [json-schema-validator] Add new port

* [json-schema-validator] Fix string ambiguous assignment error

* [json-schema-validator] Remove redundant part from patch's path

* [json-schema-validator] Forward find_package() for nlohmann_json

* [json-schema-validator] comment out lines from source's CMakeLists.txt

* [json-schema-validator] Improve portfile.cmake and regenerate patch

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
2020-06-11 00:21:27 -07:00

14 lines
529 B
Diff

diff --git a/src/json-validator.cpp b/src/json-validator.cpp
index f16f3ef..1f7b615 100644
--- a/src/json-validator.cpp
+++ b/src/json-validator.cpp
@@ -663,7 +663,7 @@ public:
#ifndef NO_STD_REGEX
attr = sch.find("pattern");
if (attr != sch.end()) {
- patternString_ = attr.value();
+ patternString_ = attr.value().get<std::string>();
pattern_ = {true, REGEX_NAMESPACE::regex(attr.value().get<std::string>(),
REGEX_NAMESPACE::regex::ECMAScript)};
sch.erase(attr);