diff options
author | Alexander Tkachev | 2016-06-21 17:07:23 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | f3a392359be2f6d05bac107a5f7bd168c178e428 (patch) | |
tree | eab864e98d1b75414f55053375fab076e1b23ecc /backends/networking | |
parent | fa3ea83165d6c378348f61f8daec85f805626dbe (diff) | |
download | scummvm-rg350-f3a392359be2f6d05bac107a5f7bd168c178e428.tar.gz scummvm-rg350-f3a392359be2f6d05bac107a5f7bd168c178e428.tar.bz2 scummvm-rg350-f3a392359be2f6d05bac107a5f7bd168c178e428.zip |
CLOUD: Fix finishSuccess() warning
Diffstat (limited to 'backends/networking')
-rw-r--r-- | backends/networking/curl/curljsonrequest.cpp | 6 | ||||
-rw-r--r-- | backends/networking/curl/curljsonrequest.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/backends/networking/curl/curljsonrequest.cpp b/backends/networking/curl/curljsonrequest.cpp index 46d88657d2..3bfc823d25 100644 --- a/backends/networking/curl/curljsonrequest.cpp +++ b/backends/networking/curl/curljsonrequest.cpp @@ -71,10 +71,10 @@ void CurlJsonRequest::handle() { char *contents = getPreparedContents(); Common::JSONValue *json = Common::JSON::parse(contents); if (json) { - finishSuccess(json); //it's JSON even if's not 200 OK? That's fine!.. + finishJson(json); //it's JSON even if's not 200 OK? That's fine!.. } else { if (_stream->httpResponseCode() == 200) //no JSON, but 200 OK? That's fine!.. - finishSuccess(nullptr); + finishJson(nullptr); else finishError(ErrorResponse(this, false, true, contents, _stream->httpResponseCode())); } @@ -89,7 +89,7 @@ void CurlJsonRequest::restart() { //with no stream available next handle() will create another one } -void CurlJsonRequest::finishSuccess(Common::JSONValue *json) { +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; diff --git a/backends/networking/curl/curljsonrequest.h b/backends/networking/curl/curljsonrequest.h index 83005a79d5..bd6f135786 100644 --- a/backends/networking/curl/curljsonrequest.h +++ b/backends/networking/curl/curljsonrequest.h @@ -41,7 +41,7 @@ protected: char *getPreparedContents(); /** Sets FINISHED state and passes the JSONValue * into user's callback in JsonResponse. */ - virtual void finishSuccess(Common::JSONValue *json); + virtual void finishJson(Common::JSONValue *json); public: CurlJsonRequest(JsonCallback cb, ErrorCallback ecb, Common::String url); |