From e6634ed26c50e99f6ccd285235fe477cb4168b06 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Sat, 9 May 2020 15:51:15 +0100 Subject: Update submodules (#4727) Closes #4708 This updates jsoncpp, mbedtls, TCLAP and SQLiteCpp to their latest stable release. A few additional changes were needed: * jsoncpp deprecated Reader, FastWriter and StyledWriter which I've replaced with some helper functions in JsonUtils.cpp * SQLiteCpp changed how it builds with external sqlite libraries, now expecting them to be installed. The simplest path was to remove sqlite from cuberite's submodule and just use SQLiteCpp's internal version. --- src/WorldStorage/StatSerializer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/WorldStorage/StatSerializer.cpp') diff --git a/src/WorldStorage/StatSerializer.cpp b/src/WorldStorage/StatSerializer.cpp index 2bc4b783f..b9f188c11 100644 --- a/src/WorldStorage/StatSerializer.cpp +++ b/src/WorldStorage/StatSerializer.cpp @@ -6,6 +6,7 @@ #include "StatSerializer.h" #include "../Statistics.h" +#include "../JsonUtils.h" @@ -44,9 +45,8 @@ bool cStatSerializer::Load(void) } Json::Value Root; - Json::Reader Reader; - if (Reader.parse(Data, Root, false)) + if (JsonUtils::ParseString(Data, Root)) { return LoadStatFromJSON(Root); } @@ -69,8 +69,7 @@ bool cStatSerializer::Save(void) return false; } - Json::StyledWriter Writer; - AString JsonData = Writer.write(Root); + AString JsonData = JsonUtils::WriteStyledString(Root); File.Write(JsonData.data(), JsonData.size()); File.Close(); -- cgit v1.2.3