mirror of https://github.com/OpenTTD/OpenTTD
Codechange: `char*` -> `char *`
parent
3f2b39e3f8
commit
5e3c7c4146
|
@ -312,7 +312,7 @@ static SOCKET ListenLoopProc(addrinfo *runp)
|
|||
|
||||
int on = 1;
|
||||
if (runp->ai_family == AF_INET6 &&
|
||||
setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&on, sizeof(on)) == -1) {
|
||||
setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, reinterpret_cast<const char *>(&on), sizeof(on)) == -1) {
|
||||
Debug(net, 3, "Could not disable IPv4 over IPv6: {}", NetworkError::GetLast().AsString());
|
||||
}
|
||||
|
||||
|
|
|
@ -155,8 +155,8 @@ bool SetNoDelay([[maybe_unused]] SOCKET d)
|
|||
return true;
|
||||
#else
|
||||
int flags = 1;
|
||||
/* The (const char*) cast is needed for windows */
|
||||
return setsockopt(d, IPPROTO_TCP, TCP_NODELAY, (const char *)&flags, sizeof(flags)) == 0;
|
||||
/* The (const char *) cast is needed for windows */
|
||||
return setsockopt(d, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<const char *>(&flags), sizeof(flags)) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ static std::string convert_tofrom_fs(iconv_t convd, std::string_view name)
|
|||
* e.g. SUSv2, pass a const pointer, whereas the newer ones, e.g.
|
||||
* IEEE 1003.1 (2004), pass a non-const pointer. */
|
||||
#ifdef HAVE_NON_CONST_ICONV
|
||||
char *inbuf = const_cast<char*>(name.data());
|
||||
char *inbuf = const_cast<char *>(name.data());
|
||||
#else
|
||||
const char *inbuf = name.data();
|
||||
#endif
|
||||
|
|
|
@ -273,7 +273,7 @@ struct LanguagePackDeleter {
|
|||
void operator()(LanguagePack *langpack)
|
||||
{
|
||||
/* LanguagePack is in fact reinterpreted char[], we need to reinterpret it back to free it properly. */
|
||||
delete[] reinterpret_cast<char*>(langpack);
|
||||
delete[] reinterpret_cast<char *>(langpack);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue