From 924a557fa39aeccebc890e21ff30ae2ca1d27ecc Mon Sep 17 00:00:00 2001 From: yhirose Date: Wed, 27 Nov 2019 07:02:42 -0500 Subject: [PATCH] Changed to use 'using' instead of 'typedef' --- httplib.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/httplib.h b/httplib.h index 539a7f4..3a1aba3 100644 --- a/httplib.h +++ b/httplib.h @@ -67,9 +67,9 @@ #if defined(_MSC_VER) #ifdef _WIN64 -typedef __int64 ssize_t; +using ssize_t = __int64; #else -typedef int ssize_t; +using ssize_t = int; #endif #if _MSC_VER < 1900 @@ -105,7 +105,7 @@ typedef int ssize_t; #define strcasecmp _stricmp #endif // strcasecmp -typedef SOCKET socket_t; +using socket_t = SOCKET; #ifdef CPPHTTPLIB_USE_POLL #define poll(fds, nfds, timeout) WSAPoll(fds, nfds, timeout) #endif @@ -125,7 +125,7 @@ typedef SOCKET socket_t; #include #include -typedef int socket_t; +using socket_t = int; #define INVALID_SOCKET (-1) #endif //_WIN32 @@ -539,9 +539,8 @@ protected: size_t payload_max_length_; private: - typedef std::vector> Handlers; - typedef std::vector> - HandersForContentReader; + using Handlers = std::vector>; + using HandersForContentReader = std::vector>; socket_t create_server_socket(const char *host, int port, int socket_flags) const;