Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
JGRennison committed Oct 5, 2024
1 parent cfbacdf commit b2eaadb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/os/unix/unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static std::string convert_tofrom_fs(iconv_t convd, std::string_view name)
iconv(convd, nullptr, nullptr, nullptr, nullptr);
if (iconv(convd, &inbuf, &inlen, &outbuf, &outlen) == (size_t)(-1)) {
Debug(misc, 0, "[iconv] error converting '{}'. Errno {}", name, errno);
return name;
return {};
}

buf.resize(outbuf - buf.data());
Expand All @@ -215,8 +215,8 @@ std::string OTTD2FS(std::string_view 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);
return name;
Debug(misc, 0, "[iconv] conversion from codeset '{}' to '{}' unsupported", INTERNALCODE, env);
return {};
}
}

Expand All @@ -235,8 +235,8 @@ std::string FS2OTTD(std::string_view 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);
return name;
Debug(misc, 0, "[iconv] conversion from codeset '{}' to '{}' unsupported", env, INTERNALCODE);
return {};
}
}

Expand Down Expand Up @@ -311,7 +311,7 @@ void OSOpenBrowser(const std::string &url)
args[1] = url.c_str();
args[2] = nullptr;
execvp(args[0], const_cast<char * const *>(args));
DEBUG(misc, 0, "Failed to open url: %s", url.c_str());
Debug(misc, 0, "Failed to open url: {}", url);
exit(0);
}
#endif /* __APPLE__ */
Expand Down

0 comments on commit b2eaadb

Please sign in to comment.