diff --git a/src/libraries b/src/libraries index de7eb239..2d0e1a96 160000 --- a/src/libraries +++ b/src/libraries @@ -1 +1 @@ -Subproject commit de7eb2392d3bf9dceb84ba7893c232efb06ced63 +Subproject commit 2d0e1a962d13c8e07d1131789642e044eb489579 diff --git a/src/servers/Server_Common/Crypt/md5.h b/src/servers/Server_Common/Crypt/md5.h index d4162221..e10bef53 100644 --- a/src/servers/Server_Common/Crypt/md5.h +++ b/src/servers/Server_Common/Crypt/md5.h @@ -7,13 +7,12 @@ namespace Core { namespace Util { - typedef struct + using md5_context = struct { uint32_t total[2]; uint32_t state[4]; uint8_t buffer[64]; - } - md5_context; + }; void md5( uint8_t *text, uint8_t *hash, int32_t size ); diff --git a/src/servers/Server_Common/Database/CharaDbConnection.h b/src/servers/Server_Common/Database/CharaDbConnection.h index b7a9bdf5..420bc7f7 100644 --- a/src/servers/Server_Common/Database/CharaDbConnection.h +++ b/src/servers/Server_Common/Database/CharaDbConnection.h @@ -81,7 +81,7 @@ enum CharaDbStatements : uint32_t class CharaDbConnection : public DbConnection { public: - typedef CharaDbStatements Statements; + using Statements = CharaDbStatements; CharaDbConnection( ConnectionInfo& connInfo ); CharaDbConnection( Core::LockedWaitQueue< boost::shared_ptr< Operation > >* q, ConnectionInfo &connInfo ); diff --git a/src/servers/Server_Common/Database/DbConnection.h b/src/servers/Server_Common/Database/DbConnection.h index 571b5bf3..237ed9f3 100644 --- a/src/servers/Server_Common/Database/DbConnection.h +++ b/src/servers/Server_Common/Database/DbConnection.h @@ -28,7 +28,7 @@ namespace Db class Operation; class DbWorker; - typedef boost::scoped_ptr< PreparedStatement > PreparedStmtScopedPtr; + using PreparedStmtScopedPtr = boost::scoped_ptr< PreparedStatement >; enum ConnectionFlags { @@ -48,7 +48,7 @@ namespace Db uint8_t asyncThreads; }; - typedef std::map< uint32_t, std::pair< std::string, ConnectionFlags > > PreparedStatementMap; + using PreparedStatementMap = std::map< uint32_t, std::pair< std::string, ConnectionFlags > >; class DbConnection : public boost::enable_shared_from_this< DbConnection > { diff --git a/src/servers/Server_Common/Database/DbWorkerPool.h b/src/servers/Server_Common/Database/DbWorkerPool.h index 63a6754a..6b364171 100644 --- a/src/servers/Server_Common/Database/DbWorkerPool.h +++ b/src/servers/Server_Common/Database/DbWorkerPool.h @@ -57,7 +57,7 @@ public: boost::shared_ptr< Mysql::ResultSet > query( const std::string& sql, boost::shared_ptr< T > connection = nullptr ); boost::shared_ptr< Mysql::PreparedResultSet > query( boost::shared_ptr< PreparedStatement > stmt ); - typedef typename T::Statements PreparedStatementIndex; + using PreparedStatementIndex = typename T::Statements; boost::shared_ptr< PreparedStatement > getPreparedStatement( PreparedStatementIndex index ); diff --git a/src/servers/Server_REST/SapphireAPI.h b/src/servers/Server_REST/SapphireAPI.h index c16c6919..26146455 100644 --- a/src/servers/Server_REST/SapphireAPI.h +++ b/src/servers/Server_REST/SapphireAPI.h @@ -21,7 +21,7 @@ namespace Core SapphireAPI(); ~SapphireAPI(); - typedef std::map< std::string, boost::shared_ptr< Session > > SessionMap; + using SessionMap = std::map< std::string, boost::shared_ptr< Session > >; bool login( const std::string& username, const std::string& pass, std::string& sId ); diff --git a/src/servers/Server_REST/main.cpp b/src/servers/Server_REST/main.cpp index 288228d5..8108836d 100644 --- a/src/servers/Server_REST/main.cpp +++ b/src/servers/Server_REST/main.cpp @@ -42,8 +42,8 @@ Core::Network::SapphireAPI g_sapphireAPI; using namespace std; using namespace boost::property_tree; -typedef SimpleWeb::Server< SimpleWeb::HTTP > HttpServer; -typedef SimpleWeb::Client< SimpleWeb::HTTP > HttpClient; +using HttpServer = SimpleWeb::Server< SimpleWeb::HTTP >; +using HttpClient = SimpleWeb::Client< SimpleWeb::HTTP >; //Added for the default_resource example void default_resource_send( const HttpServer &server, const shared_ptr< HttpServer::Response > &response, diff --git a/src/servers/Server_Zone/DebugCommand/DebugCommand.h b/src/servers/Server_Zone/DebugCommand/DebugCommand.h index 082995fa..e76b1986 100644 --- a/src/servers/Server_Zone/DebugCommand/DebugCommand.h +++ b/src/servers/Server_Zone/DebugCommand/DebugCommand.h @@ -17,7 +17,7 @@ namespace Core { { public: - typedef void ( DebugCommandHandler::*pFunc )( char *, Entity::PlayerPtr, boost::shared_ptr< DebugCommand > ); + using pFunc = void ( DebugCommandHandler::* )( char *, Entity::PlayerPtr, boost::shared_ptr< DebugCommand > ); // String for the command std::string m_commandName; diff --git a/src/servers/Server_Zone/Inventory/Inventory.h b/src/servers/Server_Zone/Inventory/Inventory.h index ffceb393..1fb690a4 100644 --- a/src/servers/Server_Zone/Inventory/Inventory.h +++ b/src/servers/Server_Zone/Inventory/Inventory.h @@ -9,7 +9,7 @@ namespace Core class ItemContainer; -typedef std::map< uint16_t, ItemContainerPtr > InventoryMap; +using InventoryMap = std::map< uint16_t, ItemContainerPtr >; class Inventory { public: @@ -135,7 +135,7 @@ public: Ring2 = 12, SoulCrystal = 13, }; - typedef std::pair< uint16_t, int8_t > InvSlotPair; + using InvSlotPair = std::pair< uint16_t, int8_t >; typedef std::vector< InvSlotPair > InvSlotPairVec; InvSlotPairVec getSlotsOfItemsInInventory( uint32_t catalogId ); diff --git a/src/servers/Server_Zone/Linkshell/LinkshellMgr.h b/src/servers/Server_Zone/Linkshell/LinkshellMgr.h index 8237bb55..e6274285 100644 --- a/src/servers/Server_Zone/Linkshell/LinkshellMgr.h +++ b/src/servers/Server_Zone/Linkshell/LinkshellMgr.h @@ -7,7 +7,7 @@ namespace Core { class Linkshell; -typedef boost::shared_ptr< Linkshell > LinkshellPtr; +using LinkshellPtr = boost::shared_ptr< Linkshell >; class LinkshellMgr { diff --git a/src/servers/Server_Zone/Network/GameConnection.h b/src/servers/Server_Zone/Network/GameConnection.h index d89ae491..24ae61e5 100644 --- a/src/servers/Server_Zone/Network/GameConnection.h +++ b/src/servers/Server_Zone/Network/GameConnection.h @@ -31,8 +31,8 @@ class GameConnection : public Connection private: typedef void ( GameConnection::* Handler )( const Packets::GamePacket& inPacket, Entity::PlayerPtr pPlayer ); - typedef std::map< uint16_t, Handler > HandlerMap; - typedef std::map< uint16_t, std::string > HandlerStrMap; + using HandlerMap = std::map< uint16_t, Handler >; + using HandlerStrMap = std::map< uint16_t, std::string >; AcceptorPtr m_pAcceptor; diff --git a/src/servers/Server_Zone/Zone/ZoneMgr.h b/src/servers/Server_Zone/Zone/ZoneMgr.h index a7ac3040..5092bd33 100644 --- a/src/servers/Server_Zone/Zone/ZoneMgr.h +++ b/src/servers/Server_Zone/Zone/ZoneMgr.h @@ -8,7 +8,7 @@ namespace Core { - typedef std::unordered_map ZoneMap; + using ZoneMap = std::unordered_map< uint32_t, ZonePtr >; class ZoneMgr {