refactor: add more nodiscard, constexpr, and noexcept (#4089)

This commit is contained in:
Charles Kerr
2022-11-03 18:08:02 -05:00
committed by GitHub
parent ee8a6bd130
commit 09bb1a60f0
20 changed files with 266 additions and 244 deletions

View File

@@ -1013,17 +1013,17 @@ std::string tr_env_get_string(std::string_view key, std::string_view default_val
void tr_net_init()
{
#ifdef _WIN32
static bool initialized = false;
if (!initialized)
{
#ifdef _WIN32
WSADATA wsaData;
WSAStartup(MAKEWORD(2, 2), &wsaData);
#endif
initialized = true;
}
#endif
}
/// mime-type