mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -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)
|
#if defined(_MSC_VER)
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
typedef __int64 ssize_t;
|
using ssize_t = __int64;
|
||||||
#else
|
#else
|
||||||
typedef int ssize_t;
|
using ssize_t = int;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _MSC_VER < 1900
|
#if _MSC_VER < 1900
|
||||||
|
@ -105,7 +105,7 @@ typedef int ssize_t;
|
||||||
#define strcasecmp _stricmp
|
#define strcasecmp _stricmp
|
||||||
#endif // strcasecmp
|
#endif // strcasecmp
|
||||||
|
|
||||||
typedef SOCKET socket_t;
|
using socket_t = SOCKET;
|
||||||
#ifdef CPPHTTPLIB_USE_POLL
|
#ifdef CPPHTTPLIB_USE_POLL
|
||||||
#define poll(fds, nfds, timeout) WSAPoll(fds, nfds, timeout)
|
#define poll(fds, nfds, timeout) WSAPoll(fds, nfds, timeout)
|
||||||
#endif
|
#endif
|
||||||
|
@ -125,7 +125,7 @@ typedef SOCKET socket_t;
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
typedef int socket_t;
|
using socket_t = int;
|
||||||
#define INVALID_SOCKET (-1)
|
#define INVALID_SOCKET (-1)
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
|
|
||||||
|
@ -539,9 +539,8 @@ protected:
|
||||||
size_t payload_max_length_;
|
size_t payload_max_length_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::vector<std::pair<std::regex, Handler>> Handlers;
|
using Handlers = std::vector<std::pair<std::regex, Handler>>;
|
||||||
typedef std::vector<std::pair<std::regex, HandlerWithContentReader>>
|
using HandersForContentReader = std::vector<std::pair<std::regex, HandlerWithContentReader>>;
|
||||||
HandersForContentReader;
|
|
||||||
|
|
||||||
socket_t create_server_socket(const char *host, int port,
|
socket_t create_server_socket(const char *host, int port,
|
||||||
int socket_flags) const;
|
int socket_flags) const;
|
||||||
|
|
Loading…
Reference in a new issue