Skip to content

Commit

Permalink
fix a few warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere committed Dec 5, 2023
1 parent 6570f0c commit cda7413
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion Source/DiabloUI/selgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ static Uint32 ztNextRefresh;
#else
static constexpr bool ztProvider = false;
static constexpr UiTxtButton* ztBlOckBtn = NULL;
static constexpr Uint32 ztNextRefresh = 0;
#endif
static unsigned selgame_connum;
static unsigned selgame_conidx;
Expand Down
12 changes: 6 additions & 6 deletions Source/dvlnet/tcp_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@ class tcp_server {
tcp_server(base_client& client, asio::io_context& ioc, packet_factory& pktfty, SNetGameData& gameinfo, unsigned serverType);
bool setup_server(const char* bindAddr, unsigned short port, char (&errorText)[256]);
void close();
~tcp_server() = default;
virtual ~tcp_server() = default;

static void make_default_gamename(char (&gamename)[NET_MAX_GAMENAME_LEN + 1]);
static void connect_acceptor(asio::ip::tcp::acceptor& acceptor, const asio::ip::tcp::endpoint& ep, asio::error_code& ec);
static void connect_socket(asio::ip::tcp::socket& sock, const char* addrstr, unsigned port, asio::io_context& ioc, asio::error_code& ec);

protected:
base_client& local_client; // TODO: tcp_client would be better, but tcp_host_client is not one...

virtual bool send_packet(packet& pkt);

private:
asio::io_context& ioc;
asio::ip::tcp::acceptor acceptor;
Expand Down Expand Up @@ -78,11 +83,6 @@ class tcp_server {
void start_timeout();
void handle_timeout(const asio::error_code& ec);
void drop_connection(const scc& con);

protected:
base_client& local_client; // TODO: tcp_client would be better, but tcp_host_client is not one...

virtual bool send_packet(packet& pkt);
};

} //namespace net
Expand Down

0 comments on commit cda7413

Please sign in to comment.