mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
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.
Origin commit data
------------------
Branch: ni/coolstream
Commit: d2d82e4b22
Author: Thilo Graf <dbt@novatux.de>
Date: 2024-09-02 (Mon, 02 Sep 2024)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -827,11 +827,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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user