diff options
author | Eugene Sandulenko | 2016-07-22 15:55:40 +0300 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | f95073f0084b3fae3e2cbf14fd98135c37eabbdf (patch) | |
tree | dcd0b23e6d4ec9b39a6292a206e8ed78a084cf47 /backends/cloud | |
parent | 53aa0c46f1a5d6aefe3f2a087c60d9a59439aedf (diff) | |
download | scummvm-rg350-f95073f0084b3fae3e2cbf14fd98135c37eabbdf.tar.gz scummvm-rg350-f95073f0084b3fae3e2cbf14fd98135c37eabbdf.tar.bz2 scummvm-rg350-f95073f0084b3fae3e2cbf14fd98135c37eabbdf.zip |
CLOUD: JANITORIAL: More whitespace fixes
Diffstat (limited to 'backends/cloud')
-rw-r--r-- | backends/cloud/box/boxlistdirectorybyidrequest.cpp | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/backends/cloud/box/boxlistdirectorybyidrequest.cpp b/backends/cloud/box/boxlistdirectorybyidrequest.cpp index 776ee71d64..697ca48db7 100644 --- a/backends/cloud/box/boxlistdirectorybyidrequest.cpp +++ b/backends/cloud/box/boxlistdirectorybyidrequest.cpp @@ -43,13 +43,15 @@ BoxListDirectoryByIdRequest::BoxListDirectoryByIdRequest(BoxStorage *storage, Co BoxListDirectoryByIdRequest::~BoxListDirectoryByIdRequest() { _ignoreCallback = true; - if (_workingRequest) _workingRequest->finish(); + if (_workingRequest) + _workingRequest->finish(); delete _listDirectoryCallback; } void BoxListDirectoryByIdRequest::start() { _ignoreCallback = true; - if (_workingRequest) _workingRequest->finish(); + if (_workingRequest) + _workingRequest->finish(); _files.clear(); _ignoreCallback = false; @@ -74,8 +76,10 @@ void BoxListDirectoryByIdRequest::makeRequest(uint32 offset) { void BoxListDirectoryByIdRequest::responseCallback(Networking::JsonResponse response) { _workingRequest = nullptr; - if (_ignoreCallback) return; - if (response.request) _date = response.request->date(); + if (_ignoreCallback) + return; + if (response.request) + _date = response.request->date(); Networking::ErrorResponse error(this); Networking::CurlJsonRequest *rq = (Networking::CurlJsonRequest *)response.request; @@ -125,16 +129,22 @@ void BoxListDirectoryByIdRequest::responseCallback(Networking::JsonResponse resp Common::JSONArray items = responseObject.getVal("entries")->asArray(); for (uint32 i = 0; i < items.size(); ++i) { - if (!Networking::CurlJsonRequest::jsonIsObject(items[i], "BoxListDirectoryByIdRequest")) continue; + if (!Networking::CurlJsonRequest::jsonIsObject(items[i], "BoxListDirectoryByIdRequest")) + continue; Common::JSONObject item = items[i]->asObject(); - if (!Networking::CurlJsonRequest::jsonContainsString(item, "id", "BoxListDirectoryByIdRequest")) continue; - if (!Networking::CurlJsonRequest::jsonContainsString(item, "name", "BoxListDirectoryByIdRequest")) continue; - if (!Networking::CurlJsonRequest::jsonContainsString(item, "type", "BoxListDirectoryByIdRequest")) continue; - if (!Networking::CurlJsonRequest::jsonContainsString(item, "modified_at", "BoxListDirectoryByIdRequest")) continue; + if (!Networking::CurlJsonRequest::jsonContainsString(item, "id", "BoxListDirectoryByIdRequest")) + continue; + if (!Networking::CurlJsonRequest::jsonContainsString(item, "name", "BoxListDirectoryByIdRequest")) + continue; + if (!Networking::CurlJsonRequest::jsonContainsString(item, "type", "BoxListDirectoryByIdRequest")) + continue; + if (!Networking::CurlJsonRequest::jsonContainsString(item, "modified_at", "BoxListDirectoryByIdRequest")) + continue; if (!Networking::CurlJsonRequest::jsonContainsString(item, "size", "BoxListDirectoryByIdRequest") && - !Networking::CurlJsonRequest::jsonContainsIntegerNumber(item, "size", "BoxListDirectoryByIdRequest")) continue; + !Networking::CurlJsonRequest::jsonContainsIntegerNumber(item, "size", "BoxListDirectoryByIdRequest")) + continue; Common::String id = item.getVal("id")->asString(); Common::String name = item.getVal("name")->asString(); @@ -162,16 +172,20 @@ void BoxListDirectoryByIdRequest::responseCallback(Networking::JsonResponse resp received += responseObject.getVal("limit")->asIntegerNumber(); bool hasMore = (received < totalCount); - if (hasMore) makeRequest(received); - else finishListing(_files); + if (hasMore) + makeRequest(received); + else + finishListing(_files); delete json; } void BoxListDirectoryByIdRequest::errorCallback(Networking::ErrorResponse error) { _workingRequest = nullptr; - if (_ignoreCallback) return; - if (error.request) _date = error.request->date(); + if (_ignoreCallback) + return; + if (error.request) + _date = error.request->date(); finishError(error); } @@ -183,7 +197,8 @@ Common::String BoxListDirectoryByIdRequest::date() const { return _date; } void BoxListDirectoryByIdRequest::finishListing(Common::Array<StorageFile> &files) { Request::finishSuccess(); - if (_listDirectoryCallback) (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files)); + if (_listDirectoryCallback) + (*_listDirectoryCallback)(Storage::ListDirectoryResponse(this, files)); } } // End of namespace Box |