mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-04 22:40:05 +00:00
Replace ifdef guards with #pragma once
tl;dr this has potentially significant compilation speed benefits.
This commit is contained in:
parent
1281fdaaf0
commit
651ccba932
@ -1,5 +1,4 @@
|
|||||||
#ifndef _CNLS_HPP
|
#pragma once
|
||||||
#define _CNLS_HPP
|
|
||||||
|
|
||||||
#include "CNProtocol.hpp"
|
#include "CNProtocol.hpp"
|
||||||
#include "Defines.hpp"
|
#include "Defines.hpp"
|
||||||
@ -24,5 +23,3 @@ public:
|
|||||||
void newConnection(CNSocket* cns);
|
void newConnection(CNSocket* cns);
|
||||||
void killConnection(CNSocket* cns);
|
void killConnection(CNSocket* cns);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef _CNP_HPP
|
#pragma once
|
||||||
#define _CNP_HPP
|
|
||||||
|
|
||||||
#define MAX_PACKETSIZE 8192
|
#define MAX_PACKETSIZE 8192
|
||||||
#define DEBUGLOG(x) x
|
#define DEBUGLOG(x) x
|
||||||
@ -152,5 +151,3 @@ public:
|
|||||||
virtual void killConnection(CNSocket* cns);
|
virtual void killConnection(CNSocket* cns);
|
||||||
virtual void onTimer(); // called every 2 seconds
|
virtual void onTimer(); // called every 2 seconds
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef _CNSS_HPP
|
#pragma once
|
||||||
#define _CNSS_HPP
|
|
||||||
|
|
||||||
#include "CNProtocol.hpp"
|
#include "CNProtocol.hpp"
|
||||||
#include "Defines.hpp"
|
#include "Defines.hpp"
|
||||||
@ -21,5 +20,3 @@ public:
|
|||||||
void killConnection(CNSocket* cns);
|
void killConnection(CNSocket* cns);
|
||||||
void onTimer();
|
void onTimer();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
There's some data shared between the Login Server and the Shard Server. Of course all of this needs to be thread-safe. No mucking about on this one!
|
There's some data shared between the Login Server and the Shard Server. Of course all of this needs to be thread-safe. No mucking about on this one!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CNSD_HPP
|
#pragma once
|
||||||
#define _CNSD_HPP
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -19,5 +18,3 @@ namespace CNSharedData {
|
|||||||
Player getPlayer(int64_t sk);
|
Player getPlayer(int64_t sk);
|
||||||
void erasePlayer(int64_t sk);
|
void erasePlayer(int64_t sk);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
@ -2,8 +2,7 @@
|
|||||||
CNStructs.hpp - defines some basic structs & useful methods for packets used by FusionFall based on the version defined
|
CNStructs.hpp - defines some basic structs & useful methods for packets used by FusionFall based on the version defined
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CNS_HPP
|
#pragma once
|
||||||
#define _CNS_HPP
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// codecvt_* is deprecated in C++17 and MSVC will throw an annoying warning because of that.
|
// codecvt_* is deprecated in C++17 and MSVC will throw an annoying warning because of that.
|
||||||
@ -45,5 +44,3 @@ uint64_t getTime();
|
|||||||
#else
|
#else
|
||||||
#error Invalid PROTOCOL_VERSION
|
#error Invalid PROTOCOL_VERSION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef _CM_HPP
|
#pragma once
|
||||||
#define _CM_HPP
|
|
||||||
|
|
||||||
#include "CNShardServer.hpp"
|
#include "CNShardServer.hpp"
|
||||||
|
|
||||||
@ -10,5 +9,3 @@ namespace ChatManager {
|
|||||||
void emoteHandler(CNSocket* sock, CNPacketData* data);
|
void emoteHandler(CNSocket* sock, CNPacketData* data);
|
||||||
void menuChatHandler(CNSocket* sock, CNPacketData* data);
|
void menuChatHandler(CNSocket* sock, CNPacketData* data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef _IM_HPP
|
#pragma once
|
||||||
#define _IM_HPP
|
|
||||||
|
|
||||||
#include "CNShardServer.hpp"
|
#include "CNShardServer.hpp"
|
||||||
|
|
||||||
@ -9,5 +8,3 @@ namespace ItemManager {
|
|||||||
void itemDeleteHandler(CNSocket* sock, CNPacketData* data);
|
void itemDeleteHandler(CNSocket* sock, CNPacketData* data);
|
||||||
void itemGMGiveHandler(CNSocket* sock, CNPacketData* data);
|
void itemGMGiveHandler(CNSocket* sock, CNPacketData* data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef _NPCMANAGER_HPP
|
#pragma once
|
||||||
#define _NPCMANAGER_HPP
|
|
||||||
|
|
||||||
#include "CNProtocol.hpp"
|
#include "CNProtocol.hpp"
|
||||||
#include "PlayerManager.hpp"
|
#include "PlayerManager.hpp"
|
||||||
@ -20,5 +19,3 @@ namespace NPCManager {
|
|||||||
void npcWarpManager(CNSocket* sock, CNPacketData* data);
|
void npcWarpManager(CNSocket* sock, CNPacketData* data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef _NM_HPP
|
#pragma once
|
||||||
#define _NM_HPP
|
|
||||||
|
|
||||||
#include "CNShardServer.hpp"
|
#include "CNShardServer.hpp"
|
||||||
|
|
||||||
@ -17,5 +16,3 @@ namespace NanoManager {
|
|||||||
void setNanoSkill(CNSocket* sock, int16_t nanoId, int16_t skillId);
|
void setNanoSkill(CNSocket* sock, int16_t nanoId, int16_t skillId);
|
||||||
void resetNanoSkill(CNSocket* sock, int16_t nanoId);
|
void resetNanoSkill(CNSocket* sock, int16_t nanoId);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef _PM_HPP
|
#pragma once
|
||||||
#define _PM_HPP
|
|
||||||
|
|
||||||
#include "Player.hpp"
|
#include "Player.hpp"
|
||||||
#include "CNProtocol.hpp"
|
#include "CNProtocol.hpp"
|
||||||
@ -44,5 +43,3 @@ namespace PlayerManager {
|
|||||||
void heartbeatPlayer(CNSocket* sock, CNPacketData* data);
|
void heartbeatPlayer(CNSocket* sock, CNPacketData* data);
|
||||||
void exitGame(CNSocket* sock, CNPacketData* data);
|
void exitGame(CNSocket* sock, CNPacketData* data);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#ifndef _SETT_HPP
|
#pragma once
|
||||||
#define _SETT_HPP
|
|
||||||
|
|
||||||
namespace settings {
|
namespace settings {
|
||||||
extern bool VERBOSE;
|
extern bool VERBOSE;
|
||||||
@ -17,5 +16,3 @@ namespace settings {
|
|||||||
|
|
||||||
void init();
|
void init();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user