mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 06:26:02 -07:00
Changed to use 'using' instead of 'typedef'
This commit is contained in:
parent
d8da740597
commit
924a557fa3
1 changed files with 6 additions and 7 deletions
13
httplib.h
13
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 <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
|
||||
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<std::pair<std::regex, Handler>> Handlers;
|
||||
typedef std::vector<std::pair<std::regex, HandlerWithContentReader>>
|
||||
HandersForContentReader;
|
||||
using Handlers = std::vector<std::pair<std::regex, Handler>>;
|
||||
using HandersForContentReader = std::vector<std::pair<std::regex, HandlerWithContentReader>>;
|
||||
|
||||
socket_t create_server_socket(const char *host, int port,
|
||||
int socket_flags) const;
|
||||
|
|
Loading…
Reference in a new issue