epgview.cpp: Fix warning about ignored 'nodiscard' attribute in show method

Changed the for-loop in the show method of CEpgData class to properly
check both conditions using the logical AND operator.
This should ensure that the return value of 'operator!=' is not ignored,
which addresses the compiler warning about the 'nodiscard' [-Wunused-result].

- Replaced ',' with '&&' in the loop condition.
This commit is contained in:
2024-07-04 16:08:36 +02:00
parent b911d5f73a
commit e1807715c3

View File

@@ -811,11 +811,12 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
// 21.07.2005 - rainerk
// Show extended information
if ( !epgData.itemDescriptions.empty() && !epgData.items.empty()) {
if (!epgData.itemDescriptions.empty() && !epgData.items.empty()) {
char line[256];
std::vector<std::string>::iterator description;
std::vector<std::string>::iterator item;
for (description = epgData.itemDescriptions.begin(), item = epgData.items.begin(); description != epgData.itemDescriptions.end(), item != epgData.items.end(); ++description, ++item) {
for (description = epgData.itemDescriptions.begin(), item = epgData.items.begin(); description != epgData.itemDescriptions.end() && item != epgData.items.end(); ++description, ++item)
{
sprintf(line, "%s: %s", (*(description)).c_str(), (*(item)).c_str());
processTextToArray(line);
}