diff options
author | Eugene Sandulenko | 2016-07-22 15:38:24 +0300 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | d57fca4665e65bca1cf487fb109d020d1233e800 (patch) | |
tree | c5a8b0e88f4c55e0f2e2afb2f78a4cd1f89d66f3 /backends/networking/curl/curljsonrequest.cpp | |
parent | cccfe7c247fed9b00c100e64433439386d6ef077 (diff) | |
download | scummvm-rg350-d57fca4665e65bca1cf487fb109d020d1233e800.tar.gz scummvm-rg350-d57fca4665e65bca1cf487fb109d020d1233e800.tar.bz2 scummvm-rg350-d57fca4665e65bca1cf487fb109d020d1233e800.zip |
CLOUD: JANITORIAL: Fix code formatting
Diffstat (limited to 'backends/networking/curl/curljsonrequest.cpp')
-rw-r--r-- | backends/networking/curl/curljsonrequest.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/backends/networking/curl/curljsonrequest.cpp b/backends/networking/curl/curljsonrequest.cpp index 7f7cbca2e0..4d87aa2649 100644 --- a/backends/networking/curl/curljsonrequest.cpp +++ b/backends/networking/curl/curljsonrequest.cpp @@ -49,7 +49,8 @@ char *CurlJsonRequest::getPreparedContents() { byte *result = _contentsStream.getData(); uint32 size = _contentsStream.size(); for (uint32 i = 0; i < size; ++i) { - if (result[i] == '\n') result[i] = ' '; //yeah, kinda stupid + if (result[i] == '\n') + result[i] = ' '; //yeah, kinda stupid else if (result[i] < 0x20 || result[i] > 0x7f) result[i] = '.'; } @@ -85,7 +86,8 @@ void CurlJsonRequest::handle() { } void CurlJsonRequest::restart() { - if (_stream) delete _stream; + if (_stream) + delete _stream; _stream = nullptr; _contentsStream = Common::MemoryWriteStreamDynamic(DisposeAfterUse::YES); //with no stream available next handle() will create another one @@ -93,8 +95,10 @@ void CurlJsonRequest::restart() { void CurlJsonRequest::finishJson(Common::JSONValue *json) { Request::finishSuccess(); - if (_jsonCallback) (*_jsonCallback)(JsonResponse(this, json)); //potential memory leak, free it in your callbacks! - else delete json; + if (_jsonCallback) + (*_jsonCallback)(JsonResponse(this, json)); //potential memory leak, free it in your callbacks! + else + delete json; } bool CurlJsonRequest::jsonIsObject(Common::JSONValue *item, const char *warningPrefix) { |