[clang-tidy] Convert loops to range based

Found with modernize-loop-convert

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2019-11-19 13:46:47 -08:00
committed by ridiculousfish
parent 1055ff321c
commit 586ac3dfa7
27 changed files with 85 additions and 105 deletions

View File

@@ -1041,8 +1041,8 @@ static wcstring get_machine_identifier() {
unsigned char mac_addr[MAC_ADDRESS_MAX_LEN] = {};
if (get_mac_address(mac_addr)) {
result.reserve(2 * MAC_ADDRESS_MAX_LEN);
for (size_t i = 0; i < MAC_ADDRESS_MAX_LEN; i++) {
append_format(result, L"%02x", mac_addr[i]);
for (auto i : mac_addr) {
append_format(result, L"%02x", i);
}
} else if (!get_hostname_identifier(result)) {
result.assign(L"nohost"); // fallback to a dummy value