mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 17:23:07 -07:00
Replace C-style casts with C++ ones
This commit is contained in:
parent
e3671050d1
commit
74cecb1b6c
20 changed files with 41 additions and 39 deletions
|
@ -105,7 +105,7 @@ GeoIPDatabase *GeoIPDatabase::load(const QString &filename, QString &error)
|
|||
|
||||
db = new GeoIPDatabase(file.size());
|
||||
|
||||
if (file.read((char *)db->m_data, db->m_size) != db->m_size) {
|
||||
if (file.read(reinterpret_cast<char *>(db->m_data), db->m_size) != db->m_size) {
|
||||
error = file.errorString();
|
||||
delete db;
|
||||
return 0;
|
||||
|
@ -130,7 +130,7 @@ GeoIPDatabase *GeoIPDatabase::load(const QByteArray &data, QString &error)
|
|||
|
||||
db = new GeoIPDatabase(data.size());
|
||||
|
||||
memcpy((char *)db->m_data, data.constData(), db->m_size);
|
||||
memcpy(reinterpret_cast<char *>(db->m_data), data.constData(), db->m_size);
|
||||
|
||||
if (!db->parseMetadata(db->readMetadata(), error) || !db->loadDB(error)) {
|
||||
delete db;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue