Skip to content

Commit

Permalink
clazy: Fix static analyzer warnings in latest web-app commits.
Browse files Browse the repository at this point in the history
QStrings are nontrivial and should be passed as const reference
instead of copying.

Convert a nontrivial range-for variable into a const reference.

Change a variable declaration from "auto" to "auto*" to make it
obvious that its a a pointer to something.
  • Loading branch information
linuxdude42 committed May 13, 2023
1 parent 299de49 commit 57cd225
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions mythtv/libs/libmythtv/channelscan/channelscanner_web.cpp
Expand Up @@ -49,19 +49,19 @@ ChannelScannerWeb *ChannelScannerWeb::getInstance()
// Called from Web Service API
// Run in http thread
bool ChannelScannerWeb::StartScan (uint cardid,
QString DesiredServices,
const QString &DesiredServices,
bool freeToAirOnly,
bool ChannelNumbersOnly,
bool CompleteChannelsOnly,
bool FullChannelSearch,
bool RemoveDuplicates,
bool AddFullTS,
bool TestDecryptable,
QString ScanType,
QString FreqTable,
const QString &ScanType,
const QString &FreqTable,
QString modulation,
QString FirstChan,
QString LastChan,
const QString &FirstChan,
const QString &LastChan,
uint ScanId,
bool IgnoreSignalTimeout,
bool FollowNITSetting,
Expand Down
10 changes: 5 additions & 5 deletions mythtv/libs/libmythtv/channelscan/channelscanner_web.h
Expand Up @@ -59,19 +59,19 @@ class MTV_PUBLIC ChannelScannerWeb : public ChannelScanner
void log(const QString &msg);

bool StartScan (uint CardId,
QString DesiredServices,
const QString &DesiredServices,
bool FreeToAirOnly,
bool ChannelNumbersOnly,
bool CompleteChannelsOnly,
bool FullChannelSearch,
bool RemoveDuplicates,
bool AddFullTS,
bool TestDecryptable,
QString ScanType,
QString FreqTable,
const QString &ScanType,
const QString &FreqTable,
QString Modulation,
QString FirstChan,
QString LastChan,
const QString &FirstChan,
const QString &LastChan,
uint ScanId,
bool IgnoreSignalTimeout,
bool FollowNITSetting,
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythbackend/servicesv2/v2channel.cpp
Expand Up @@ -1116,9 +1116,9 @@ V2ScanList* V2Channel::GetScanList ( uint SourceId)
{
auto scanList = LoadScanList(SourceId);
auto * pResult = new V2ScanList();
for (ScanInfo scan : scanList)
for (const ScanInfo &scan : scanList)
{
auto pItem = pResult->AddNewScan();
auto *pItem = pResult->AddNewScan();
pItem->setScanId (scan.m_scanid);
pItem->setCardId (scan.m_cardid);
pItem->setSourceId (scan.m_sourceid);
Expand Down

0 comments on commit 57cd225

Please sign in to comment.