Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
Changed typedef constructions to type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
eidheim committed Sep 5, 2017
1 parent defdcbf commit 8f86f39
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client_ws.hpp
Expand Up @@ -580,7 +580,7 @@ namespace SimpleWeb {
template <class socket_type>
class SocketClient : public SocketClientBase<socket_type> {};

typedef asio::ip::tcp::socket WS;
using WS = asio::ip::tcp::socket;

template <>
class SocketClient<WS> : public SocketClientBase<WS> {
Expand Down
2 changes: 1 addition & 1 deletion client_wss.hpp
Expand Up @@ -10,7 +10,7 @@
#endif

namespace SimpleWeb {
typedef asio::ssl::stream<asio::ip::tcp::socket> WSS;
using WSS = asio::ssl::stream<asio::ip::tcp::socket>;

template <>
class SocketClient<WSS> : public SocketClientBase<WSS> {
Expand Down
2 changes: 1 addition & 1 deletion server_ws.hpp
Expand Up @@ -701,7 +701,7 @@ namespace SimpleWeb {
template <class socket_type>
class SocketServer : public SocketServerBase<socket_type> {};

typedef asio::ip::tcp::socket WS;
using WS = asio::ip::tcp::socket;

template <>
class SocketServer<WS> : public SocketServerBase<WS> {
Expand Down
2 changes: 1 addition & 1 deletion server_wss.hpp
Expand Up @@ -13,7 +13,7 @@


namespace SimpleWeb {
typedef asio::ssl::stream<asio::ip::tcp::socket> WSS;
using WSS = asio::ssl::stream<asio::ip::tcp::socket>;

template <>
class SocketServer<WSS> : public SocketServerBase<WSS> {
Expand Down
2 changes: 1 addition & 1 deletion utility.hpp
Expand Up @@ -33,7 +33,7 @@ namespace SimpleWeb {
}
};

typedef std::unordered_multimap<std::string, std::string, CaseInsensitiveHash, CaseInsensitiveEqual> CaseInsensitiveMultimap;
using CaseInsensitiveMultimap = std::unordered_multimap<std::string, std::string, CaseInsensitiveHash, CaseInsensitiveEqual>;

/// Percent encoding and decoding
class Percent {
Expand Down
4 changes: 2 additions & 2 deletions ws_examples.cpp
Expand Up @@ -3,8 +3,8 @@

using namespace std;

typedef SimpleWeb::SocketServer<SimpleWeb::WS> WsServer;
typedef SimpleWeb::SocketClient<SimpleWeb::WS> WsClient;
using WsServer = SimpleWeb::SocketServer<SimpleWeb::WS>;
using WsClient = SimpleWeb::SocketClient<SimpleWeb::WS>;

int main() {
// WebSocket (WS)-server at port 8080 using 1 thread
Expand Down
4 changes: 2 additions & 2 deletions wss_examples.cpp
Expand Up @@ -3,8 +3,8 @@

using namespace std;

typedef SimpleWeb::SocketServer<SimpleWeb::WSS> WssServer;
typedef SimpleWeb::SocketClient<SimpleWeb::WSS> WssClient;
using WssServer = SimpleWeb::SocketServer<SimpleWeb::WSS>;
using WssClient = SimpleWeb::SocketClient<SimpleWeb::WSS>;

int main() {
// WebSocket Secure (WSS)-server at port 8080 using 1 thread
Expand Down

0 comments on commit 8f86f39

Please sign in to comment.