1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Rename String methods to use lowerCamelCase

This commit is contained in:
Aaron van Geffen
2024-12-11 22:28:31 +01:00
parent a24dc2e60a
commit 35e117aca2
102 changed files with 587 additions and 589 deletions

View File

@@ -27,7 +27,7 @@ namespace OpenRCT2::Http
static void ThrowWin32Exception(const char* methodName)
{
auto errorCode = GetLastError();
auto msg = String::StdFormat("%s failed, error: %d.", methodName, errorCode);
auto msg = String::stdFormat("%s failed, error: %d.", methodName, errorCode);
throw std::runtime_error(msg);
}
@@ -88,8 +88,8 @@ namespace OpenRCT2::Http
// we don't really count as a header.
if (index != 0 && wKey.size() != 0)
{
auto key = String::ToUtf8(wKey);
auto value = String::ToUtf8(wValue);
auto key = String::toUtf8(wKey);
auto value = String::toUtf8(wValue);
headers[key] = std::move(value);
}
wKey.clear();
@@ -162,11 +162,11 @@ namespace OpenRCT2::Http
url.dwUrlPathLength = static_cast<DWORD>(-1);
url.dwExtraInfoLength = static_cast<DWORD>(-1);
auto wUrl = String::ToWideChar(req.url);
auto wUrl = String::toWideChar(req.url);
if (!WinHttpCrackUrl(wUrl.c_str(), 0, 0, &url))
throw std::invalid_argument("Unable to parse URI.");
auto userAgent = String::ToWideChar(OPENRCT2_USER_AGENT);
auto userAgent = String::toWideChar(OPENRCT2_USER_AGENT);
hSession = WinHttpOpen(
userAgent.c_str(), WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0);
if (hSession == nullptr)
@@ -192,7 +192,7 @@ namespace OpenRCT2::Http
for (auto header : req.header)
{
auto fullHeader = String::ToWideChar(header.first) + L": " + String::ToWideChar(header.second);
auto fullHeader = String::toWideChar(header.first) + L": " + String::toWideChar(header.second);
if (!WinHttpAddRequestHeaders(hRequest, fullHeader.c_str(), static_cast<ULONG>(-1L), WINHTTP_ADDREQ_FLAG_ADD))
ThrowWin32Exception("WinHttpAddRequestHeaders");
}