From ccab85ffb2c735f65ddf8c688730b6d211c073f6 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 7 Nov 2019 17:08:11 +0100 Subject: SCUMM HE: MBC: Remove empty callbacks --- engines/scumm/he/moonbase/net_main.cpp | 16 +++------------- engines/scumm/he/moonbase/net_main.h | 3 --- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/engines/scumm/he/moonbase/net_main.cpp b/engines/scumm/he/moonbase/net_main.cpp index 8c8d0f8a3c..4c82de421d 100644 --- a/engines/scumm/he/moonbase/net_main.cpp +++ b/engines/scumm/he/moonbase/net_main.cpp @@ -237,7 +237,7 @@ void Net::disableSessionJoining() { debug(1, "Net::disableSessionJoining()"); // PN_DisableSessionPlayerJoin Networking::PostRequest *rq = new Networking::PostRequest(_serverprefix + "/disablesession", - new Common::Callback(this, &Net::disableSessionJoiningCallback), + nullptr, new Common::Callback(this, &Net::disableSessionJoiningErrorCallback)); char *buf = (char *)malloc(MAX_PACKET_SIZE); @@ -250,9 +250,6 @@ void Net::disableSessionJoining() { ConnMan.addRequest(rq); } -void Net::disableSessionJoiningCallback(Common::JSONValue *response) { -} - void Net::disableSessionJoiningErrorCallback(Networking::ErrorResponse error) { warning("Error in disableSessionJoining(): %ld %s", error.httpResponseCode, error.response.c_str()); } @@ -293,7 +290,7 @@ bool Net::destroyPlayer(int32 playerDPID) { debug(1, "Net::destroyPlayer(%d)", playerDPID); Networking::PostRequest *rq = new Networking::PostRequest(_serverprefix + "/removeuser", - new Common::Callback(this, &Net::destroyPlayerCallback), + nullptr, new Common::Callback(this, &Net::destroyPlayerErrorCallback)); char *buf = (char *)malloc(MAX_PACKET_SIZE); @@ -308,9 +305,6 @@ bool Net::destroyPlayer(int32 playerDPID) { return true; } -void Net::destroyPlayerCallback(Common::JSONValue *response) { -} - void Net::destroyPlayerErrorCallback(Networking::ErrorResponse error) { warning("Error in destroyPlayer(): %ld %s", error.httpResponseCode, error.response.c_str()); } @@ -440,7 +434,7 @@ int Net::remoteSendData(int typeOfSend, int sendTypeParam, int type, Common::Str debug("Package to send: %s", res.c_str()); Networking::PostRequest *rq = new Networking::PostRequest(_serverprefix + "/packet", - new Common::Callback(this, &Net::remoteSendDataCallback), + nullptr, new Common::Callback(this, &Net::remoteSendDataErrorCallback)); rq->setPostData(buf, res.size()); @@ -475,10 +469,6 @@ int Net::remoteSendData(int typeOfSend, int sendTypeParam, int type, Common::Str return defaultRes; } -void Net::remoteSendDataCallback(Common::JSONValue *response) { - debug(1, "remoteSendData: Got: '%s'", response->stringify().c_str()); -} - void Net::remoteSendDataErrorCallback(Networking::ErrorResponse error) { warning("Error in remoteSendData(): %ld %s", error.httpResponseCode, error.response.c_str()); } diff --git a/engines/scumm/he/moonbase/net_main.h b/engines/scumm/he/moonbase/net_main.h index 6a3ac94eab..c78e1f16aa 100644 --- a/engines/scumm/he/moonbase/net_main.h +++ b/engines/scumm/he/moonbase/net_main.h @@ -78,16 +78,13 @@ private: void addUserCallback(Common::JSONValue *response); void addUserErrorCallback(Networking::ErrorResponse error); - void disableSessionJoiningCallback(Common::JSONValue *response); void disableSessionJoiningErrorCallback(Networking::ErrorResponse error); void endSessionCallback(Common::JSONValue *response); void endSessionErrorCallback(Networking::ErrorResponse error); - void destroyPlayerCallback(Common::JSONValue *response); void destroyPlayerErrorCallback(Networking::ErrorResponse error); - void remoteSendDataCallback(Common::JSONValue *response); void remoteSendDataErrorCallback(Networking::ErrorResponse error); void remoteReceiveDataCallback(Common::JSONValue *response); -- cgit v1.2.3