UI: Miscellaneous code cleanups

Remove a few unused variables and other minor changes. No functional
differences. Issues detected by PVS Studio.
This commit is contained in:
Richard Stanway committed 2020-09-27 19:03:21 +02:00
1 parent 1a14304784
commit 7d3fa7315a
7 files changed
+30 -41

No files matched your search

+11 -16
View File
@@ -1939,14 +1939,11 @@ void OBSBasic::OnFirstLoad()
/* Attempt to load init screen if available */
if (cef) {
WhatsNewInfoThread *wnit = new WhatsNewInfoThread();
if (wnit) {
connect(wnit, &WhatsNewInfoThread::Result, this,
connect(wnit, &WhatsNewInfoThread::Result, this,
&OBSBasic::ReceivedIntroJson);
}
if (wnit) {
introCheckThread.reset(wnit);
introCheckThread->start();
}
introCheckThread.reset(wnit);
introCheckThread->start();
}
#endif
@@ -2061,14 +2058,13 @@ void OBSBasic::ReceivedIntroJson(const QString &text)
WhatsNewBrowserInitThread *wnbit =
new WhatsNewBrowserInitThread(QT_UTF8(info_url.c_str()));
if (wnbit) {
connect(wnbit, &WhatsNewBrowserInitThread::Result, this,
connect(wnbit, &WhatsNewBrowserInitThread::Result, this,
&OBSBasic::ShowWhatsNew);
}
if (wnbit) {
whatsNewInitThread.reset(wnbit);
whatsNewInitThread->start();
}
whatsNewInitThread.reset(wnbit);
whatsNewInitThread->start();
#else
UNUSED_PARAMETER(text);
#endif
@@ -7051,8 +7047,7 @@ OBSProjector *OBSBasic::OpenProjector(obs_source_t *source, int monitor,
OBSProjector *projector =
new OBSProjector(nullptr, source, monitor, type);
if (projector)
projectors.emplace_back(projector);
projectors.emplace_back(projector);
return projector;
}