aboutsummaryrefslogtreecommitdiff
path: root/src/univalue/lib/univalue_write.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/univalue/lib/univalue_write.cpp')
-rw-r--r--src/univalue/lib/univalue_write.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/univalue/lib/univalue_write.cpp b/src/univalue/lib/univalue_write.cpp
index 827eb9b271..3a2c580c7f 100644
--- a/src/univalue/lib/univalue_write.cpp
+++ b/src/univalue/lib/univalue_write.cpp
@@ -1,9 +1,8 @@
// Copyright 2014 BitPay Inc.
// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+// file COPYING or https://opensource.org/licenses/mit-license.php.
#include <iomanip>
-#include <sstream>
#include <stdio.h>
#include "univalue.h"
#include "univalue_escapes.h"
@@ -14,13 +13,13 @@ static std::string json_escape(const std::string& inS)
outS.reserve(inS.size() * 2);
for (unsigned int i = 0; i < inS.size(); i++) {
- unsigned char ch = inS[i];
+ unsigned char ch = static_cast<unsigned char>(inS[i]);
const char *escStr = escapes[ch];
if (escStr)
outS += escStr;
else
- outS += ch;
+ outS += static_cast<char>(ch);
}
return outS;