Codechange: convert printf DEBUG statements to fmt Debug statements

This commit is contained in:
rubidium42
2021-06-12 09:10:17 +02:00
committed by rubidium42
parent a99ac62c1a
commit 55a11710a6
131 changed files with 601 additions and 601 deletions

View File

@@ -164,7 +164,7 @@ static const char *convert_tofrom_fs(iconv_t convd, const char *name, char *outb
iconv(convd, nullptr, nullptr, nullptr, nullptr);
if (iconv(convd, &inbuf, &inlen, &outbuf, &outlen) == (size_t)(-1)) {
DEBUG(misc, 0, "[iconv] error converting '%s'. Errno %d", name, errno);
Debug(misc, 0, "[iconv] error converting '{}'. Errno {}", name, errno);
}
*outbuf = '\0';
@@ -186,7 +186,7 @@ std::string OTTD2FS(const std::string &name)
const char *env = GetLocalCode();
convd = iconv_open(env, INTERNALCODE);
if (convd == (iconv_t)(-1)) {
DEBUG(misc, 0, "[iconv] conversion from codeset '%s' to '%s' unsupported", INTERNALCODE, env);
Debug(misc, 0, "[iconv] conversion from codeset '{}' to '{}' unsupported", INTERNALCODE, env);
return name;
}
}
@@ -208,7 +208,7 @@ std::string FS2OTTD(const std::string &name)
const char *env = GetLocalCode();
convd = iconv_open(INTERNALCODE, env);
if (convd == (iconv_t)(-1)) {
DEBUG(misc, 0, "[iconv] conversion from codeset '%s' to '%s' unsupported", env, INTERNALCODE);
Debug(misc, 0, "[iconv] conversion from codeset '{}' to '{}' unsupported", env, INTERNALCODE);
return name;
}
}
@@ -306,7 +306,7 @@ void OSOpenBrowser(const char *url)
args[1] = url;
args[2] = nullptr;
execvp(args[0], const_cast<char * const *>(args));
DEBUG(misc, 0, "Failed to open url: %s", url);
Debug(misc, 0, "Failed to open url: {}", url);
exit(0);
}
#endif /* __APPLE__ */