Mac OS X 10.6 & More C++03 Support (#68)

* Mac OS X 10.6 & More C++03 Support

* Fix SDL2 options.txt loading for C++03

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
This commit is contained in:
Brent
2023-08-27 03:46:15 -05:00
committed by GitHub
parent 0c38c01c28
commit f7915a1dab
57 changed files with 1736 additions and 1534 deletions

View File

@@ -8,7 +8,7 @@
#pragma once
#include <unordered_map>
#include <map>
#include "NetEventCallback.hpp"
#include "Minecraft.hpp"
#include "RakNetInstance.hpp"
@@ -31,11 +31,15 @@ struct RakNetGUIDHasher
{
return size_t(guid.g);
}
bool operator()(const RakNet::RakNetGUID& guid1, const RakNet::RakNetGUID& guid2) const
{
return guid1 == guid2;
}
};
typedef void(ServerSideNetworkHandler::* CommandFunction)(OnlinePlayer* player, const std::vector<std::string>& parms);
typedef std::unordered_map<std::string, CommandFunction> CommandMap;
typedef std::unordered_map<RakNet::RakNetGUID, OnlinePlayer*, RakNetGUIDHasher> OnlinePlayerMap;
typedef std::map<std::string, CommandFunction> CommandMap;
typedef std::map<RakNet::RakNetGUID, OnlinePlayer*, RakNetGUIDHasher> OnlinePlayerMap;
class ServerSideNetworkHandler : public NetEventCallback, public LevelListener
{