use std chr functions
The ones in std have overloads for const char/char. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Max Kellermann
parent
99afe8e6d1
commit
e4dad42ca1
@@ -35,6 +35,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <ws2tcpip.h>
|
||||
@@ -49,8 +50,6 @@
|
||||
#include <sys/un.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_UN
|
||||
|
||||
static std::string
|
||||
@@ -104,7 +103,7 @@ ToString(SocketAddress address) noexcept
|
||||
return "unknown";
|
||||
|
||||
#ifdef HAVE_IPV6
|
||||
if (strchr(host, ':') != nullptr) {
|
||||
if (std::strchr(host, ':') != nullptr) {
|
||||
std::string result("[");
|
||||
result.append(host);
|
||||
result.append("]:");
|
||||
|
||||
Reference in New Issue
Block a user