1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Cleanup various headers to reduce compilation times (#6255)

* Cleanup various headers to reduce compilation times
This commit is contained in:
Loïc Blot 2017-08-16 22:11:45 +02:00 committed by GitHub
parent 816bca32ac
commit 85511a642f
51 changed files with 94 additions and 84 deletions

View file

@ -23,7 +23,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "client.h"
#include "networkprotocol.h"
#include "networkpacket.h"
class NetworkPacket;
enum ToClientConnectionState {
TOCLIENT_STATE_NOT_CONNECTED,

View file

@ -563,6 +563,20 @@ void IncomingSplitBuffer::removeUnreliableTimedOuts(float dtime, float timeout)
}
}
/*
ConnectionCommand
*/
void ConnectionCommand::send(u16 peer_id_, u8 channelnum_, NetworkPacket *pkt,
bool reliable_)
{
type = CONNCMD_SEND;
peer_id = peer_id_;
channelnum = channelnum_;
data = pkt->oldForgePacket();
reliable = reliable_;
}
/*
Channel
*/

View file

@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "socket.h"
#include "exceptions.h"
#include "constants.h"
#include "network/networkpacket.h"
#include "util/pointer.h"
#include "util/container.h"
#include "util/thread.h"
@ -433,15 +432,8 @@ struct ConnectionCommand
type = CONNCMD_DISCONNECT_PEER;
peer_id = peer_id_;
}
void send(u16 peer_id_, u8 channelnum_,
NetworkPacket* pkt, bool reliable_)
{
type = CONNCMD_SEND;
peer_id = peer_id_;
channelnum = channelnum_;
data = pkt->oldForgePacket();
reliable = reliable_;
}
void send(u16 peer_id_, u8 channelnum_, NetworkPacket* pkt, bool reliable_);
void ack(u16 peer_id_, u8 channelnum_, const SharedBuffer<u8> &data_)
{

View file

@ -18,7 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
*/
#include "networkpacket.h"
#include "debug.h"
#include <sstream>
#include "exceptions.h"
#include "util/serialize.h"

View file

@ -20,9 +20,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef NETWORKPACKET_HEADER
#define NETWORKPACKET_HEADER
#include <SColor.h>
#include "util/pointer.h"
#include "util/numeric.h"
#include "networkprotocol.h"
class NetworkPacket
{

View file

@ -23,7 +23,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "server.h"
#include "networkprotocol.h"
#include "networkpacket.h"
class NetworkPacket;
enum ToServerConnectionState {
TOSERVER_STATE_NOT_CONNECTED,