diff options
author | phunkyfish <phunkyfish@gmail.com> | 2019-09-04 13:31:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-04 13:31:03 +0100 |
commit | 8b4547955bb8f1f19792ce660f4e139888eee68b (patch) | |
tree | 19ad4665678be016024e749a106dd8e650db1abe | |
parent | cdcabff354da8fdb95238361ddf5cf8c6dd174b7 (diff) | |
parent | 55e8df217e8b1cbd36d56e306f0120c7caa5ed4c (diff) |
Merge pull request #16568 from phunkyfish/pvr-coverity
Pvr coverity
-rw-r--r-- | xbmc/pvr/channels/PVRChannel.cpp | 55 | ||||
-rw-r--r-- | xbmc/pvr/channels/PVRChannel.h | 48 |
2 files changed, 38 insertions, 65 deletions
diff --git a/xbmc/pvr/channels/PVRChannel.cpp b/xbmc/pvr/channels/PVRChannel.cpp index 490b55b705..9d0fb069fa 100644 --- a/xbmc/pvr/channels/PVRChannel.cpp +++ b/xbmc/pvr/channels/PVRChannel.cpp @@ -42,52 +42,25 @@ bool CPVRChannel::operator!=(const CPVRChannel &right) const } CPVRChannel::CPVRChannel(bool bRadio /* = false */) + : m_bIsRadio(bRadio) { - m_iChannelId = -1; - m_bIsRadio = bRadio; - m_bIsHidden = false; - m_bIsUserSetIcon = false; - m_bIsUserSetName = false; - m_bIsLocked = false; - m_iLastWatched = 0; - m_bChanged = false; - m_bHasArchive = false; - - m_iEpgId = -1; - m_bEPGEnabled = true; - m_strEPGScraper = "client"; - - m_iUniqueId = -1; - m_iClientId = -1; - m_iClientEncryptionSystem = -1; - m_iOrder = 0; - UpdateEncryptionName(); } CPVRChannel::CPVRChannel(const PVR_CHANNEL &channel, unsigned int iClientId) -: m_clientChannelNumber(channel.iChannelNumber, channel.iSubChannelNumber) -{ - m_iChannelId = -1; - m_bIsRadio = channel.bIsRadio; - m_bIsHidden = channel.bIsHidden; - m_bIsUserSetIcon = false; - m_bIsUserSetName = false; - m_bIsLocked = false; - m_strIconPath = channel.strIconPath; - m_strChannelName = channel.strChannelName; - m_iUniqueId = channel.iUniqueId; - m_strClientChannelName = channel.strChannelName; - m_strInputFormat = channel.strInputFormat; - m_iClientEncryptionSystem = channel.iEncryptionSystem; - m_iClientId = iClientId; - m_iLastWatched = 0; - m_bEPGEnabled = !channel.bIsHidden; - m_strEPGScraper = "client"; - m_iEpgId = -1; - m_bChanged = false; - m_bHasArchive = channel.bHasArchive; - +: m_bIsRadio(channel.bIsRadio), + m_bIsHidden(channel.bIsHidden), + m_strIconPath(channel.strIconPath), + m_strChannelName(channel.strChannelName), + m_bHasArchive(channel.bHasArchive), + m_bEPGEnabled(!channel.bIsHidden), + m_iUniqueId(channel.iUniqueId), + m_iClientId(iClientId), + m_clientChannelNumber(channel.iChannelNumber, channel.iSubChannelNumber), + m_strClientChannelName(channel.strChannelName), + m_strInputFormat(channel.strInputFormat), + m_iClientEncryptionSystem(channel.iEncryptionSystem) +{ if (m_strChannelName.empty()) m_strChannelName = StringUtils::Format("%s %d", g_localizeStrings.Get(19029).c_str(), m_iUniqueId); diff --git a/xbmc/pvr/channels/PVRChannel.h b/xbmc/pvr/channels/PVRChannel.h index aa0f9ac751..5991efd513 100644 --- a/xbmc/pvr/channels/PVRChannel.h +++ b/xbmc/pvr/channels/PVRChannel.h @@ -438,42 +438,42 @@ namespace PVR /*! @name XBMC related channel data */ //@{ - int m_iChannelId; /*!< the identifier given to this channel by the TV database */ - bool m_bIsRadio; /*!< true if this channel is a radio channel, false if not */ - bool m_bIsHidden; /*!< true if this channel is hidden, false if not */ - bool m_bIsUserSetName; /*!< true if user set the channel name via GUI, false if not */ - bool m_bIsUserSetIcon; /*!< true if user set the icon via GUI, false if not */ - bool m_bIsLocked; /*!< true if channel is locked, false if not */ - std::string m_strIconPath; /*!< the path to the icon for this channel */ - std::string m_strChannelName; /*!< the name for this channel used by XBMC */ - time_t m_iLastWatched; /*!< last time channel has been watched */ - bool m_bChanged; /*!< true if anything in this entry was changed that needs to be persisted */ - CPVRChannelNumber m_channelNumber; /*!< the number this channel has in the currently selected channel group */ + int m_iChannelId = -1; /*!< the identifier given to this channel by the TV database */ + bool m_bIsRadio = false; /*!< true if this channel is a radio channel, false if not */ + bool m_bIsHidden = false; /*!< true if this channel is hidden, false if not */ + bool m_bIsUserSetName = false; /*!< true if user set the channel name via GUI, false if not */ + bool m_bIsUserSetIcon = false; /*!< true if user set the icon via GUI, false if not */ + bool m_bIsLocked = false; /*!< true if channel is locked, false if not */ + std::string m_strIconPath; /*!< the path to the icon for this channel */ + std::string m_strChannelName; /*!< the name for this channel used by XBMC */ + time_t m_iLastWatched = 0; /*!< last time channel has been watched */ + bool m_bChanged = false; /*!< true if anything in this entry was changed that needs to be persisted */ + CPVRChannelNumber m_channelNumber; /*!< the number this channel has in the currently selected channel group */ std::shared_ptr<CPVRRadioRDSInfoTag> m_rdsTag; /*! < the radio rds data, if available for the channel. */ - bool m_bHasArchive; /*!< true if this channel supports archive */ + bool m_bHasArchive = false; /*!< true if this channel supports archive */ //@} /*! @name EPG related channel data */ //@{ - int m_iEpgId; /*!< the id of the EPG for this channel */ - bool m_bEPGEnabled; /*!< don't use an EPG for this channel if set to false */ - std::string m_strEPGScraper; /*!< the name of the scraper to be used for this channel */ + int m_iEpgId = -1; /*!< the id of the EPG for this channel */ + bool m_bEPGEnabled = false; /*!< don't use an EPG for this channel if set to false */ + std::string m_strEPGScraper = "client"; /*!< the name of the scraper to be used for this channel */ std::shared_ptr<CPVREpg> m_epg; //@} /*! @name Client related channel data */ //@{ - int m_iUniqueId; /*!< the unique identifier for this channel */ - int m_iClientId; /*!< the identifier of the client that serves this channel */ - CPVRChannelNumber m_clientChannelNumber; /*!< the channel number on the client */ - std::string m_strClientChannelName; /*!< the name of this channel on the client */ - std::string m_strInputFormat; /*!< the stream input type based on ffmpeg/libavformat/allformats.c */ - std::string m_strFileNameAndPath; /*!< the filename to be used by PVRManager to open and read the stream */ - int m_iClientEncryptionSystem; /*!< the encryption system used by this channel. 0 for FreeToAir, -1 for unknown */ - std::string m_strClientEncryptionName; /*!< the name of the encryption system used by this channel */ - int m_iOrder; /*!< the order from this channels currently selected group memeber */ + int m_iUniqueId = -1; /*!< the unique identifier for this channel */ + int m_iClientId = -1; /*!< the identifier of the client that serves this channel */ + CPVRChannelNumber m_clientChannelNumber; /*!< the channel number on the client */ + std::string m_strClientChannelName; /*!< the name of this channel on the client */ + std::string m_strInputFormat; /*!< the stream input type based on ffmpeg/libavformat/allformats.c */ + std::string m_strFileNameAndPath; /*!< the filename to be used by PVRManager to open and read the stream */ + int m_iClientEncryptionSystem = -1; /*!< the encryption system used by this channel. 0 for FreeToAir, -1 for unknown */ + std::string m_strClientEncryptionName; /*!< the name of the encryption system used by this channel */ + int m_iOrder = 0; /*!< the order from this channels currently selected group memeber */ //@} mutable CCriticalSection m_critSection; |