mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-07-03 18:21:16 -03:00
[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:
committed by
ridiculousfish
parent
1055ff321c
commit
586ac3dfa7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user