From 3ab6cd8a39e8b5520c934d301f3d7aa8cd8f03f0 Mon Sep 17 00:00:00 2001 From: knowledge4igor Date: Tue, 5 Sep 2017 01:32:21 +0300 Subject: [PATCH] Change 'typedef' constructions to type aliases --- client_http.hpp | 2 +- client_https.hpp | 2 +- http_examples.cpp | 4 ++-- https_examples.cpp | 4 ++-- server_http.hpp | 2 +- server_https.hpp | 2 +- tests/io_test.cpp | 4 ++-- utility.hpp | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/client_http.hpp b/client_http.hpp index 4d0571b..041da2a 100644 --- a/client_http.hpp +++ b/client_http.hpp @@ -594,7 +594,7 @@ namespace SimpleWeb { template class Client : public ClientBase {}; - typedef asio::ip::tcp::socket HTTP; + using HTTP = asio::ip::tcp::socket; template <> class Client : public ClientBase { diff --git a/client_https.hpp b/client_https.hpp index 444332d..3f8b63f 100644 --- a/client_https.hpp +++ b/client_https.hpp @@ -10,7 +10,7 @@ #endif namespace SimpleWeb { - typedef asio::ssl::stream HTTPS; + using HTTPS = asio::ssl::stream; template <> class Client : public ClientBase { diff --git a/http_examples.cpp b/http_examples.cpp index 47304dc..ed05bfb 100644 --- a/http_examples.cpp +++ b/http_examples.cpp @@ -19,8 +19,8 @@ using namespace std; // Added for the json-example: using namespace boost::property_tree; -typedef SimpleWeb::Server HttpServer; -typedef SimpleWeb::Client HttpClient; +using HttpServer = SimpleWeb::Server; +using HttpClient = SimpleWeb::Client; int main() { // HTTP-server at port 8080 using 1 thread diff --git a/https_examples.cpp b/https_examples.cpp index 6f15263..d86ee7f 100644 --- a/https_examples.cpp +++ b/https_examples.cpp @@ -17,8 +17,8 @@ using namespace std; // Added for the json-example: using namespace boost::property_tree; -typedef SimpleWeb::Server HttpsServer; -typedef SimpleWeb::Client HttpsClient; +using HttpsServer = SimpleWeb::Server; +using HttpsClient = SimpleWeb::Client; int main() { // HTTPS-server at port 8080 using 1 thread diff --git a/server_http.hpp b/server_http.hpp index b671bc5..f1a8077 100644 --- a/server_http.hpp +++ b/server_http.hpp @@ -551,7 +551,7 @@ namespace SimpleWeb { template class Server : public ServerBase {}; - typedef asio::ip::tcp::socket HTTP; + using HTTP = asio::ip::tcp::socket; template <> class Server : public ServerBase { diff --git a/server_https.hpp b/server_https.hpp index 51e3b62..1f8b81d 100644 --- a/server_https.hpp +++ b/server_https.hpp @@ -13,7 +13,7 @@ #include namespace SimpleWeb { - typedef asio::ssl::stream HTTPS; + using HTTPS = asio::ssl::stream; template <> class Server : public ServerBase { diff --git a/tests/io_test.cpp b/tests/io_test.cpp index 38a5476..6de2cfc 100644 --- a/tests/io_test.cpp +++ b/tests/io_test.cpp @@ -9,8 +9,8 @@ using namespace std; namespace asio = boost::asio; #endif -typedef SimpleWeb::Server HttpServer; -typedef SimpleWeb::Client HttpClient; +using HttpServer = SimpleWeb::Server; +using HttpClient = SimpleWeb::Client; int main() { // Test ScopeRunner diff --git a/utility.hpp b/utility.hpp index cb08c90..17ab62b 100644 --- a/utility.hpp +++ b/utility.hpp @@ -33,7 +33,7 @@ namespace SimpleWeb { } }; - typedef std::unordered_multimap CaseInsensitiveMultimap; + using CaseInsensitiveMultimap = std::unordered_multimap; /// Percent encoding and decoding class Percent {