<div dir="ltr">Pushed to Release_3.1 and grafted the fix to default.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 2, 2019 at 2:49 AM Nomis101 🐝 <<a href="mailto:Nomis101@web.de">Nomis101@web.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This is cherry-picked from "Update json11 to v1.0.0 release" and just fixes Issue #373. I checked that it builds on macOS Mojave with hdr10plus enabled.<br>
Find patch attached.<br>
<br>
<br>
<br>
<br>
<br>
<br>
# HG changeset patch<br>
# User Nomis101 <<a href="mailto:Nomis101@web.de" target="_blank">Nomis101@web.de</a>><br>
# Date 1564692921 -7200<br>
# Do Aug 01 22:55:21 2019 +0200<br>
# Node ID 28e4787b2a438200da0ff38d4d171d14fb6b82fc<br>
# Parent 459d3822c608948d9c15322b770f7f9b7e2a233e<br>
fix Issue #373<br>
<br>
diff -r 459d3822c608 -r 28e4787b2a43 source/dynamicHDR10/json11/json11.cpp<br>
--- a/source/dynamicHDR10/json11/json11.cpp Fr Jul 26 10:53:09 2019 +0530<br>
+++ b/source/dynamicHDR10/json11/json11.cpp Do Aug 01 22:55:21 2019 +0200<br>
@@ -38,21 +38,30 @@ static const int max_depth = 200;<br>
<br>
using std::string;<br>
using std::vector;<br>
using std::map;<br>
using std::make_shared;<br>
using std::initializer_list;<br>
using std::move;<br>
<br>
+ /* Helper for representing null - just a do-nothing struct, plus comparison<br>
+ * operators so the helpers in JsonValue work. We can't use nullptr_t because<br>
+ * it may not be orderable.<br>
+ */<br>
+ struct NullStruct {<br>
+ bool operator==(NullStruct) const { return true; }<br>
+ bool operator<(NullStruct) const { return false; }<br>
+ };<br>
+<br>
/* * * * * * * * * * * * * * * * * * * *<br>
* Serialization<br>
*/<br>
<br>
-static void dump(std::nullptr_t, string &out) {<br>
+static void dump(NullStruct, string &out) {<br>
out += "null";<br>
}<br>
<br>
static void dump(double value, string &out) {<br>
if (std::isfinite(value)) {<br>
char buf[32];<br>
snprintf(buf, sizeof buf, "%.17g", value);<br>
out += buf;<br>
@@ -209,19 +218,19 @@ public:<br>
class JsonObject final : public Value<Json::OBJECT, Json::object> {<br>
const Json::object &object_items() const override { return m_value; }<br>
const Json & operator[](const string &key) const override;<br>
public:<br>
explicit JsonObject(const Json::object &value) : Value(value) {}<br>
explicit JsonObject(Json::object &&value) : Value(move(value)) {}<br>
};<br>
<br>
-class JsonNull final : public Value<Json::NUL, std::nullptr_t> {<br>
+class JsonNull final : public Value<Json::NUL, NullStruct> {<br>
public:<br>
- JsonNull() : Value(nullptr) {}<br>
+ JsonNull() : Value({}) {}<br>
};<br>
<br>
/* * * * * * * * * * * * * * * * * * * *<br>
* Static globals - static-init-safe<br>
*/<br>
struct Statics {<br>
const std::shared_ptr<JsonValue> null = make_shared<JsonNull>();<br>
const std::shared_ptr<JsonValue> t = make_shared<JsonBoolean>(true);<br>
<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><font face="georgia, serif">Regards,</font><div><font face="georgia, serif">Aruna</font></div></div></div>