Skip to content

Remove unused parameters and reorder constructors to get rid of warnings #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions src/internal/sio_client_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ namespace sio
{
/*************************public:*************************/
client_impl::client_impl() :
m_con_state(con_closed),
m_ping_interval(0),
m_ping_timeout(0),
m_network_thread(),
m_reconn_attempts(0xFFFFFFFF),
m_reconn_made(0),
m_con_state(con_closed),
m_reconn_delay(5000),
m_reconn_delay_max(25000)
m_reconn_delay_max(25000),
m_reconn_attempts(0xFFFFFFFF),
m_reconn_made(0)
{
using websocketpp::log::alevel;
#ifndef DEBUG
Expand Down Expand Up @@ -285,12 +285,11 @@ namespace sio
if(ec || m_con.expired())
{
if (ec != boost::asio::error::operation_aborted)
LOG("ping exit,con is expired?"<<m_con.expired()<<",ec:"<<ec.message()<<endl);
LOG("ping exit,con is expired?"<<m_con.expired()<<",ec:"<<ec.message()<<endl){};
return;
}
packet p(packet::frame_ping);
m_packet_mgr.encode(p,
[&](bool isBin,shared_ptr<const string> payload)
m_packet_mgr.encode(p, [&](bool /*isBin*/,shared_ptr<const string> payload)
{
lib::error_code ec;
this->m_client.send(this->m_con, *payload, frame::opcode::text, ec);
Expand Down Expand Up @@ -370,7 +369,7 @@ namespace sio
}
}

void client_impl::on_fail(connection_hdl con)
void client_impl::on_fail(connection_hdl)
{
m_con.reset();
m_con_state = con_closed;
Expand Down Expand Up @@ -449,7 +448,7 @@ namespace sio
}
}

void client_impl::on_message(connection_hdl con, client_type::message_ptr msg)
void client_impl::on_message(connection_hdl, client_type::message_ptr msg)
{
if (m_ping_timeout_timer) {
boost::system::error_code ec;
Expand Down Expand Up @@ -495,7 +494,7 @@ namespace sio
m_ping_timer.reset(new boost::asio::deadline_timer(m_client.get_io_service()));
boost::system::error_code ec;
m_ping_timer->expires_from_now(milliseconds(m_ping_interval), ec);
if(ec)LOG("ec:"<<ec.message()<<endl);
if(ec)LOG("ec:"<<ec.message()<<endl){};
m_ping_timer->async_wait(lib::bind(&client_impl::ping,this,lib::placeholders::_1));
LOG("On handshake,sid:"<<m_sid<<",ping interval:"<<m_ping_interval<<",ping timeout"<<m_ping_timeout<<endl);
return;
Expand Down
4 changes: 2 additions & 2 deletions src/internal/sio_packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ namespace sio
_frame(frame_message),
_type((isAck?type_ack : type_event) | type_undetermined),
_nsp(nsp),
_message(msg),
_pack_id(pack_id),
_message(msg),
_pending_buffers(0)
{
assert((!isAck
Expand All @@ -210,8 +210,8 @@ namespace sio
_frame(frame_message),
_type(type),
_nsp(nsp),
_message(msg),
_pack_id(-1),
_message(msg),
_pending_buffers(0)
{

Expand Down
4 changes: 2 additions & 2 deletions src/sio_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ namespace sio

private:
//disable copy constructor and assign operator.
client(client const& cl){}
void operator=(client const& cl){}
client(client const&){}
void operator=(client const&){}

client_impl* m_impl;
};
Expand Down
6 changes: 3 additions & 3 deletions src/sio_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ namespace sio

socket::impl::impl(client_impl *client,std::string const& nsp):
m_client(client),
m_nsp(nsp),
m_connected(false)
m_connected(false),
m_nsp(nsp)
{
NULL_GUARD(client);
if(m_client->opened())
Expand Down Expand Up @@ -449,7 +449,7 @@ namespace sio
}
}

void socket::impl::ack(int msgId, const string &name, const message::list &ack_message)
void socket::impl::ack(int msgId, const string &, const message::list &ack_message)
{
packet p(m_nsp, ack_message.to_array_message(),msgId,true);
send_packet(p);
Expand Down
4 changes: 2 additions & 2 deletions src/sio_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ namespace sio

private:
//disable copy constructor and assign operator.
socket(socket const& sock){}
void operator=(socket const& sock){}
socket(socket const&){}
void operator=(socket const&){}

class impl;
impl *m_impl;
Expand Down