vlc | branch: master | Steve Lhomme <[email protected]> | Wed Dec 23 12:58:27 2015 +0100| [46d740aa98e6c3bf14ce994a9a78941bc823e5ae] | committer: Jean-Baptiste Kempf
chromecast: processMessage() doesn't need to return a value Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=46d740aa98e6c3bf14ce994a9a78941bc823e5ae --- modules/stream_out/chromecast/chromecast.h | 2 +- modules/stream_out/chromecast/chromecast_ctrl.cpp | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/modules/stream_out/chromecast/chromecast.h b/modules/stream_out/chromecast/chromecast.h index 9cdd1bb..239321a 100644 --- a/modules/stream_out/chromecast/chromecast.h +++ b/modules/stream_out/chromecast/chromecast.h @@ -85,7 +85,7 @@ struct intf_sys_t std::queue<castchannel::CastMessage> messagesToSend; unsigned i_requestId; - int processMessage(const castchannel::CastMessage &msg); + void processMessage(const castchannel::CastMessage &msg); }; #endif /* VLC_CHROMECAST_H */ diff --git a/modules/stream_out/chromecast/chromecast_ctrl.cpp b/modules/stream_out/chromecast/chromecast_ctrl.cpp index 7bb45e3..865a0d2 100644 --- a/modules/stream_out/chromecast/chromecast_ctrl.cpp +++ b/modules/stream_out/chromecast/chromecast_ctrl.cpp @@ -91,9 +91,8 @@ intf_sys_t::~intf_sys_t() * @param msg the CastMessage to process * @return 0 if the message has been successfuly processed else -1 */ -int intf_sys_t::processMessage(const castchannel::CastMessage &msg) +void intf_sys_t::processMessage(const castchannel::CastMessage &msg) { - int i_ret = 0; std::string namespace_ = msg.namespace_(); if (namespace_ == NAMESPACE_DEVICEAUTH) @@ -104,12 +103,10 @@ int intf_sys_t::processMessage(const castchannel::CastMessage &msg) if (authMessage.has_error()) { msg_Err(p_stream, "Authentification error: %d", authMessage.error().error_type()); - i_ret = -1; } else if (!authMessage.has_response()) { msg_Err(p_stream, "Authentification message has no response field"); - i_ret = -1; } else { @@ -136,7 +133,6 @@ int intf_sys_t::processMessage(const castchannel::CastMessage &msg) else { msg_Err(p_stream, "Heartbeat command not supported: %s", type.c_str()); - i_ret = -1; } json_value_free(p_data); @@ -198,7 +194,6 @@ int intf_sys_t::processMessage(const castchannel::CastMessage &msg) { msg_Err(p_stream, "Receiver command not supported: %s", msg.payload_utf8().c_str()); - i_ret = -1; } json_value_free(p_data); @@ -226,7 +221,6 @@ int intf_sys_t::processMessage(const castchannel::CastMessage &msg) { msg_Err(p_stream, "Media command not supported: %s", msg.payload_utf8().c_str()); - i_ret = -1; } json_value_free(p_data); @@ -248,16 +242,12 @@ int intf_sys_t::processMessage(const castchannel::CastMessage &msg) { msg_Err(p_stream, "Connection command not supported: %s", type.c_str()); - i_ret = -1; } } else { msg_Err(p_stream, "Unknown namespace: %s", msg.namespace_().c_str()); - i_ret = -1; } - - return i_ret; } /***************************************************************************** _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
