Change 'typedef' constructions to type aliases

This commit is contained in:
knowledge4igor 2017-09-05 01:32:21 +03:00
commit 3ab6cd8a39
8 changed files with 11 additions and 11 deletions

View file

@ -594,7 +594,7 @@ namespace SimpleWeb {
template <class socket_type>
class Client : public ClientBase<socket_type> {};
typedef asio::ip::tcp::socket HTTP;
using HTTP = asio::ip::tcp::socket;
template <>
class Client<HTTP> : public ClientBase<HTTP> {

View file

@ -10,7 +10,7 @@
#endif
namespace SimpleWeb {
typedef asio::ssl::stream<asio::ip::tcp::socket> HTTPS;
using HTTPS = asio::ssl::stream<asio::ip::tcp::socket>;
template <>
class Client<HTTPS> : public ClientBase<HTTPS> {

View file

@ -19,8 +19,8 @@ using namespace std;
// Added for the json-example:
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>;
int main() {
// HTTP-server at port 8080 using 1 thread

View file

@ -17,8 +17,8 @@ using namespace std;
// Added for the json-example:
using namespace boost::property_tree;
typedef SimpleWeb::Server<SimpleWeb::HTTPS> HttpsServer;
typedef SimpleWeb::Client<SimpleWeb::HTTPS> HttpsClient;
using HttpsServer = SimpleWeb::Server<SimpleWeb::HTTPS>;
using HttpsClient = SimpleWeb::Client<SimpleWeb::HTTPS>;
int main() {
// HTTPS-server at port 8080 using 1 thread

View file

@ -551,7 +551,7 @@ namespace SimpleWeb {
template <class socket_type>
class Server : public ServerBase<socket_type> {};
typedef asio::ip::tcp::socket HTTP;
using HTTP = asio::ip::tcp::socket;
template <>
class Server<HTTP> : public ServerBase<HTTP> {

View file

@ -13,7 +13,7 @@
#include <openssl/ssl.h>
namespace SimpleWeb {
typedef asio::ssl::stream<asio::ip::tcp::socket> HTTPS;
using HTTPS = asio::ssl::stream<asio::ip::tcp::socket>;
template <>
class Server<HTTPS> : public ServerBase<HTTPS> {

View file

@ -9,8 +9,8 @@ using namespace std;
namespace asio = boost::asio;
#endif
typedef SimpleWeb::Server<SimpleWeb::HTTP> HttpServer;
typedef SimpleWeb::Client<SimpleWeb::HTTP> HttpClient;
using HttpServer = SimpleWeb::Server<SimpleWeb::HTTP>;
using HttpClient = SimpleWeb::Client<SimpleWeb::HTTP>;
int main() {
// Test ScopeRunner

View file

@ -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 {