From 14dcdc36e3a8f8d82fc628ebcce40410437bc6a5 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 12 Apr 2023 21:07:12 +0200 Subject: [PATCH] infoviewer: Updated naming convention to consistently indicate return values 'getter' methods do convey a return value, but getLiveStreamInfo() returns nothing, therefore we should use a more appropriate name, such as 'initialize' or 'modify', improving code clarity and adherence to best practices. --- src/gui/infoviewer.cpp | 4 ++-- src/gui/infoviewer.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 1c1d9dd09..3501ab6fe 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -862,7 +862,7 @@ void CInfoViewer::setInfobarTimeout(int timeout_ext) timeoutEnd = CRCInput::calcTimeoutEnd(timeout + timeout_ext); } -void CInfoViewer::getLivestreamInfo() +void CInfoViewer::initLiveStreamInfo() { CZapitChannel *cc = CZapit::getInstance()->GetCurrentChannel(); bool web_mode = (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webtv || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio); @@ -1013,7 +1013,7 @@ bool CInfoViewer::showLivestreamInfo() bool web_mode = (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webtv || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio); if (web_mode && (info_CurrentNext.current_uniqueKey == 0 && info_CurrentNext.next_uniqueKey == 0)) { - getLivestreamInfo(); + initLiveStreamInfo(); display_Info(_livestreamInfo1.c_str(), _livestreamInfo2.c_str(), false); infoViewerBB->showBBButtons(true); diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index 8a78a7cb2..bd53cb2a2 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -147,7 +147,7 @@ class CInfoViewer : public sigc::trackable void reset_allScala(); void check_channellogo_ca_SettingsChange(); void sendNoEpg(const t_channel_id channel_id); - void getLivestreamInfo(); + void initLiveStreamInfo(); bool showLivestreamInfo(); public: @@ -206,7 +206,7 @@ class CInfoViewer : public sigc::trackable int getSwitchMode() {return zap_mode;} void resetSwitchMode() {setSwitchMode(IV_MODE_DEFAULT);} - void get_livestreamInfo() { getLivestreamInfo(); } + void get_livestreamInfo() { initLiveStreamInfo(); } std::string get_livestreamInfo1() { return _livestreamInfo1; } std::string get_livestreamInfo2() { return _livestreamInfo2; }