Replace use of of unsigned char* with fmt

Using unsigned char* or signed char* results in a deprecation warning, which is treated as an error.  It needs to be casted to regular char* for it to work.
This commit is contained in:
Pokechu22 2022-01-12 23:05:45 -08:00
parent 29d6dd609c
commit fd04f4f32d
3 changed files with 6 additions and 3 deletions

View File

@ -228,7 +228,8 @@ HttpRequest::Response HttpRequest::Impl::Fetch(const std::string& url, Method me
else
{
ERROR_LOG_FMT(COMMON, "Failed to {} {}: server replied with code {} and body\n\x1b[0m{:.{}}",
type, url, response_code, buffer.data(), static_cast<int>(buffer.size()));
type, url, response_code, reinterpret_cast<char*>(buffer.data()),
static_cast<int>(buffer.size()));
}
return {};
}

View File

@ -598,7 +598,8 @@ bool BluetoothEmuDevice::SendEventRemoteNameReq(const bdaddr_t& bd)
DEBUG_LOG_FMT(IOS_WIIMOTE, " bd: {:02x}:{:02x}:{:02x}:{:02x}:{:02x}:{:02x}",
remote_name_req->bdaddr[0], remote_name_req->bdaddr[1], remote_name_req->bdaddr[2],
remote_name_req->bdaddr[3], remote_name_req->bdaddr[4], remote_name_req->bdaddr[5]);
DEBUG_LOG_FMT(IOS_WIIMOTE, " RemoteName: {}", remote_name_req->RemoteName);
DEBUG_LOG_FMT(IOS_WIIMOTE, " RemoteName: {}",
reinterpret_cast<char*>(remote_name_req->RemoteName));
AddEventToQueue(event);

View File

@ -108,7 +108,8 @@ std::optional<IPCReply> BluetoothRealDevice::Open(const OpenRequest& request)
sizeof(serial_number));
NOTICE_LOG_FMT(IOS_WIIMOTE, "Using device {:04x}:{:04x} (rev {:x}) for Bluetooth: {} {} {}",
device_descriptor.idVendor, device_descriptor.idProduct,
device_descriptor.bcdDevice, manufacturer, product, serial_number);
device_descriptor.bcdDevice, reinterpret_cast<char*>(manufacturer),
reinterpret_cast<char*>(product), reinterpret_cast<char*>(serial_number));
m_is_wii_bt_module =
device_descriptor.idVendor == 0x57e && device_descriptor.idProduct == 0x305;
return false;