Replace use of C style casts

This commit is contained in:
Jonas Kvinge
2020-06-15 17:59:02 +02:00
parent a68c249d4e
commit 72ede666d4
35 changed files with 105 additions and 111 deletions

View File

@@ -60,7 +60,7 @@ MtpConnection::MtpConnection(const QUrl &url) : device_(nullptr) {
}
if (url_query.hasQueryItem("vendor")) {
LIBMTP_raw_device_t *raw_device = (LIBMTP_raw_device_t*)malloc(sizeof(LIBMTP_raw_device_t));
LIBMTP_raw_device_t *raw_device = static_cast<LIBMTP_raw_device_t*>(malloc(sizeof(LIBMTP_raw_device_t)));
raw_device->device_entry.vendor = url_query.queryItemValue("vendor").toLatin1().data();
raw_device->device_entry.product = url_query.queryItemValue("product").toLatin1().data();
raw_device->device_entry.vendor_id = url_query.queryItemValue("vendor_id").toUShort();