fixed warnings for VC++

This commit is contained in:
CPunch 2020-08-22 13:38:27 -05:00
parent 2072bdcff7
commit 35b424c531
6 changed files with 11 additions and 11 deletions

View File

@ -133,7 +133,7 @@ protected:
void init(); void init();
bool active = true; bool active = true;
long int lastTimer; uint64_t lastTimer;
public: public:
PacketHandler pHandler; PacketHandler pHandler;

View File

@ -37,7 +37,7 @@ void CNShardServer::killConnection(CNSocket* cns) {
} }
void CNShardServer::onTimer() { void CNShardServer::onTimer() {
long int currTime = getTime(); uint64_t currTime = getTime();
auto cachedPlayers = PlayerManager::players; auto cachedPlayers = PlayerManager::players;

View File

@ -10,7 +10,7 @@ std::string U16toU8(char16_t* src) {
} }
// returns number of char16_t that was written at des // returns number of char16_t that was written at des
int U8toU16(std::string src, char16_t* des) { size_t U8toU16(std::string src, char16_t* des) {
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>,char16_t> convert; std::wstring_convert<std::codecvt_utf8_utf16<char16_t>,char16_t> convert;
std::u16string tmp = convert.from_bytes(src); std::u16string tmp = convert.from_bytes(src);

View File

@ -28,7 +28,7 @@
// TODO: rewrite U16toU8 & U8toU16 to not use codecvt // TODO: rewrite U16toU8 & U8toU16 to not use codecvt
std::string U16toU8(char16_t* src); std::string U16toU8(char16_t* src);
int U8toU16(std::string src, char16_t* des); // returns number of char16_t that was written at des size_t U8toU16(std::string src, char16_t* des); // returns number of char16_t that was written at des
uint64_t getTime(); uint64_t getTime();
// The PROTOCOL_VERSION definition is defined by the build system. // The PROTOCOL_VERSION definition is defined by the build system.

View File

@ -8,12 +8,12 @@
* implementing just yet anyway. * implementing just yet anyway.
*/ */
const float VALUE_BATTERY_EMPTY_PENALTY = 0.5; const float VALUE_BATTERY_EMPTY_PENALTY = 0.5f;
const float CN_EP_RANK_1 = 0.8; const float CN_EP_RANK_1 = 0.8f;
const float CN_EP_RANK_2 = 0.7; const float CN_EP_RANK_2 = 0.7f;
const float CN_EP_RANK_3 = 0.5; const float CN_EP_RANK_3 = 0.5f;
const float CN_EP_RANK_4 = 0.3; const float CN_EP_RANK_4 = 0.3f;
const float CN_EP_RANK_5 = 0.29; const float CN_EP_RANK_5 = 0.29f;
enum { enum {
SUCC = 1, SUCC = 1,

View File

@ -13,7 +13,7 @@ struct PlayerView {
std::list<CNSocket*> viewable; std::list<CNSocket*> viewable;
std::list<int32_t> viewableNPCs; std::list<int32_t> viewableNPCs;
Player plr; Player plr;
int long lastHeartbeat; uint64_t lastHeartbeat;
}; };