From c49d83172f198029da2074cbdfb70ac285294cc5 Mon Sep 17 00:00:00 2001 From: Alexandre Hamez Date: Mon, 8 Jun 2015 11:38:52 +0200 Subject: [PATCH 1/2] Avoid warning with Xcode's clang --- src/json.hpp.re2c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 45979a5737..02cb28553a 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -1983,7 +1983,7 @@ class basic_json o.width(0); // do the actual serialization - j.dump(o, prettyPrint, indentation); + j.dump(o, prettyPrint, static_cast(indentation)); return o; } From f17733b859a84e08fcdfd09e0cf33889d414947f Mon Sep 17 00:00:00 2001 From: Alexandre Hamez Date: Mon, 8 Jun 2015 11:39:32 +0200 Subject: [PATCH 2/2] Directly return ostream --- src/json.hpp.re2c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 02cb28553a..d6e2744ac8 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -1990,8 +1990,7 @@ class basic_json /// serialize to stream friend std::ostream& operator>>(const basic_json& j, std::ostream& o) { - o << j; - return o; + return o << j; }