aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg_System.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-08-29 18:59:00 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-08-29 19:32:00 -0700
commit130d9019dfddc491dafe762a0dde41f5d3ada87e (patch)
tree12ec81550a45757c89a6f8fb37c45e8d6dc73969 /toolsrc/src/vcpkg_System.cpp
parent673bb9e19e37efc62181e6d5e195053f9ee48886 (diff)
downloadvcpkg-130d9019dfddc491dafe762a0dde41f5d3ada87e.tar.gz
vcpkg-130d9019dfddc491dafe762a0dde41f5d3ada87e.zip
Naming convention fixes
Diffstat (limited to 'toolsrc/src/vcpkg_System.cpp')
-rw-r--r--toolsrc/src/vcpkg_System.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp
index b769d6d57..f5106b25e 100644
--- a/toolsrc/src/vcpkg_System.cpp
+++ b/toolsrc/src/vcpkg_System.cpp
@@ -224,15 +224,15 @@ namespace vcpkg::System
void print(const Color c, const CStringView message)
{
- const HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
+ const HANDLE console_handle = GetStdHandle(STD_OUTPUT_HANDLE);
- CONSOLE_SCREEN_BUFFER_INFO consoleScreenBufferInfo{};
- GetConsoleScreenBufferInfo(hConsole, &consoleScreenBufferInfo);
- const auto original_color = consoleScreenBufferInfo.wAttributes;
+ CONSOLE_SCREEN_BUFFER_INFO console_screen_buffer_info{};
+ GetConsoleScreenBufferInfo(console_handle, &console_screen_buffer_info);
+ const auto original_color = console_screen_buffer_info.wAttributes;
- SetConsoleTextAttribute(hConsole, static_cast<WORD>(c) | (original_color & 0xF0));
+ SetConsoleTextAttribute(console_handle, static_cast<WORD>(c) | (original_color & 0xF0));
print(message);
- SetConsoleTextAttribute(hConsole, original_color);
+ SetConsoleTextAttribute(console_handle, original_color);
}
void println(const Color c, const CStringView message)
@@ -260,23 +260,23 @@ namespace vcpkg::System
return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ;
}
- Optional<std::wstring> get_registry_string(HKEY base, const CWStringView subKey, const CWStringView valuename)
+ Optional<std::wstring> get_registry_string(HKEY base, const CWStringView sub_key, const CWStringView valuename)
{
HKEY k = nullptr;
- const LSTATUS ec = RegOpenKeyExW(base, subKey, NULL, KEY_READ, &k);
+ const LSTATUS ec = RegOpenKeyExW(base, sub_key, NULL, KEY_READ, &k);
if (ec != ERROR_SUCCESS) return nullopt;
- DWORD dwBufferSize = 0;
- DWORD dwType = 0;
- auto rc = RegQueryValueExW(k, valuename, nullptr, &dwType, nullptr, &dwBufferSize);
- if (rc != ERROR_SUCCESS || !is_string_keytype(dwType) || dwBufferSize == 0 ||
- dwBufferSize % sizeof(wchar_t) != 0)
+ DWORD dw_buffer_size = 0;
+ DWORD dw_type = 0;
+ auto rc = RegQueryValueExW(k, valuename, nullptr, &dw_type, nullptr, &dw_buffer_size);
+ if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size == 0 ||
+ dw_buffer_size % sizeof(wchar_t) != 0)
return nullopt;
std::wstring ret;
- ret.resize(dwBufferSize / sizeof(wchar_t));
+ ret.resize(dw_buffer_size / sizeof(wchar_t));
- rc = RegQueryValueExW(k, valuename, nullptr, &dwType, reinterpret_cast<LPBYTE>(ret.data()), &dwBufferSize);
- if (rc != ERROR_SUCCESS || !is_string_keytype(dwType) || dwBufferSize != sizeof(wchar_t) * ret.size())
+ rc = RegQueryValueExW(k, valuename, nullptr, &dw_type, reinterpret_cast<LPBYTE>(ret.data()), &dw_buffer_size);
+ if (rc != ERROR_SUCCESS || !is_string_keytype(dw_type) || dw_buffer_size != sizeof(wchar_t) * ret.size())
return nullopt;
ret.pop_back(); // remove extra trailing null byte