1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 04:54:18 +00:00

Remove meaningless checking for nullptr

Fix PVS-Studio issue "rss_autodownloader.cpp:111: warning: V668
There is no sense in testing the 'm_fileStorage' pointer against null,
as the memory was allocated using the 'new' operator.
The exception will be generated in the case of memory allocation error".

PR #17347.
This commit is contained in:
nmariusp 2022-07-14 08:19:38 +03:00 committed by GitHub
parent d2a29c2f87
commit e2b140b8dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,8 +108,6 @@ AutoDownloader::AutoDownloader()
m_instance = this; m_instance = this;
m_fileStorage = new AsyncFileStorage(specialFolderLocation(SpecialFolder::Config) / Path(CONF_FOLDER_NAME)); m_fileStorage = new AsyncFileStorage(specialFolderLocation(SpecialFolder::Config) / Path(CONF_FOLDER_NAME));
if (!m_fileStorage)
throw RuntimeError(tr("Directory for RSS AutoDownloader data is unavailable."));
m_fileStorage->moveToThread(m_ioThread); m_fileStorage->moveToThread(m_ioThread);
connect(m_ioThread, &QThread::finished, m_fileStorage, &AsyncFileStorage::deleteLater); connect(m_ioThread, &QThread::finished, m_fileStorage, &AsyncFileStorage::deleteLater);