Core, DolphinQt, UICommon: Fix all cases of -Wrange-loop-construct in gcc 11

This commit is contained in:
Emmanuel Gil Peyrot
2021-05-17 21:00:13 +02:00
parent db02b50d2e
commit ab252aedfa
5 changed files with 25 additions and 20 deletions

View File

@ -546,8 +546,11 @@ void BluetoothRealDevice::SaveLinkKeys()
oss << Common::MacAddressToString(address);
oss << '=';
oss << std::hex;
for (const u16& data : entry.second)
oss << std::setfill('0') << std::setw(2) << data;
for (u8 data : entry.second)
{
// We cast to u16 here in order to have it displayed as two nibbles.
oss << std::setfill('0') << std::setw(2) << static_cast<u16>(data);
}
oss << std::dec << ',';
}
std::string config_string = oss.str();