Change up strcasecmp/strncasecmp to be more C++y

This commit is contained in:
iikorni
2026-08-30 16:40:12 -05:00
parent 7a697986c6
commit da2a9a8fbc
32 changed files with 351 additions and 790 deletions
+5 -5
View File
@@ -388,14 +388,14 @@ qsocket_t *NET_Connect(const char *host) {
host = NULL;
if (host) {
if (q_strcasecmp(host, "local") == 0) {
if (std::is_eq(common::strcasecmp(host, "local"))) {
numdrivers = 1;
goto JustDoIt;
}
if (hostCacheCount) {
for (n = 0; n < hostCacheCount; n++)
if (q_strcasecmp(host, hostcache[n].name) == 0) {
if (std::is_eq(common::strcasecmp(host, hostcache[n].name))) {
host = hostcache[n].cname;
break;
}
@@ -419,7 +419,7 @@ qsocket_t *NET_Connect(const char *host) {
if (hostCacheCount) {
for (n = 0; n < hostCacheCount; n++) {
if (q_strcasecmp(host, hostcache[n].name) == 0) {
if (std::is_eq(common::strcasecmp(host, hostcache[n].name))) {
host = hostcache[n].cname;
break;
}
@@ -690,8 +690,8 @@ void NET_Init(void) {
port = common::check_param("-ipxport");
if (port.has_value()) {
if (port < com_argc - 1)
DEFAULTnet_hostport = std::atoi(com_argv[port.value() + 1]);
if (port < common::_argv.size() - 1)
DEFAULTnet_hostport = std::atoi(common::_argv[port.value() + 1].c_str());
else
Sys_Error("NET_Init: you must specify a number after -port");
}