aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2023-07-19 19:42:14 +0100
committerRechi <Rechi@users.noreply.github.com>2023-07-19 19:42:14 +0100
commit09f61c4353413438c4149bd4b6c5a845727aefba (patch)
treeb9eb7962983f07665458ed2a883864981d19d20a
parent4f1aa9a9ad0434a6f7b453ed050425ca886ad626 (diff)
[clang-tidy] modernize-use-default-member-init
-rw-r--r--.clang-tidy1
-rw-r--r--tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm21
-rw-r--r--tools/depends/native/TexturePacker/src/XBTFWriter.cpp2
-rw-r--r--tools/depends/native/TexturePacker/src/XBTFWriter.h2
-rw-r--r--xbmc/CueDocument.cpp8
-rw-r--r--xbmc/ServiceBroker.cpp1
-rw-r--r--xbmc/ServiceBroker.h8
-rw-r--r--xbmc/addons/AddonStatusHandler.cpp3
-rw-r--r--xbmc/addons/AddonStatusHandler.h2
-rw-r--r--xbmc/addons/Scraper.cpp5
-rw-r--r--xbmc/addons/Scraper.h6
-rw-r--r--xbmc/addons/VFSEntry.cpp3
-rw-r--r--xbmc/addons/VFSEntry.h2
-rw-r--r--xbmc/addons/Webinterface.cpp4
-rw-r--r--xbmc/addons/Webinterface.h2
-rw-r--r--xbmc/addons/interfaces/gui/Window.cpp11
-rw-r--r--xbmc/addons/interfaces/gui/Window.h20
-rw-r--r--xbmc/addons/interfaces/gui/controls/Rendering.cpp10
-rw-r--r--xbmc/addons/interfaces/gui/controls/Rendering.h15
-rw-r--r--xbmc/addons/settings/AddonSettings.cpp1
-rw-r--r--xbmc/addons/settings/AddonSettings.h2
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.cpp7
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.h4
-rw-r--r--xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.cpp4
-rw-r--r--xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.h2
-rw-r--r--xbmc/cores/RetroPlayer/playback/GameLoop.cpp7
-rw-r--r--xbmc/cores/RetroPlayer/playback/GameLoop.h4
-rw-r--r--xbmc/cores/RetroPlayer/playback/ReversiblePlayback.cpp8
-rw-r--r--xbmc/cores/RetroPlayer/playback/ReversiblePlayback.h12
-rw-r--r--xbmc/cores/RetroPlayer/streams/RetroPlayerAudio.cpp2
-rw-r--r--xbmc/cores/RetroPlayer/streams/RetroPlayerAudio.h2
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecAndroidMediaCodec.cpp14
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecAndroidMediaCodec.h14
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.cpp4
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.h4
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp21
-rw-r--r--xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h14
-rw-r--r--xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxVobsub.h6
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.cpp1
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.h2
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRChannel.cpp3
-rw-r--r--xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRChannel.h2
-rw-r--r--xbmc/cores/VideoPlayer/DVDMessage.cpp4
-rw-r--r--xbmc/cores/paplayer/PAPlayer.cpp16
-rw-r--r--xbmc/cores/paplayer/PAPlayer.h18
-rw-r--r--xbmc/dialogs/GUIDialogColorPicker.cpp3
-rw-r--r--xbmc/dialogs/GUIDialogColorPicker.h2
-rw-r--r--xbmc/dialogs/GUIDialogExtendedProgressBar.h9
-rw-r--r--xbmc/dialogs/GUIDialogNumeric.cpp8
-rw-r--r--xbmc/dialogs/GUIDialogNumeric.h8
-rw-r--r--xbmc/filesystem/CircularCache.cpp14
-rw-r--r--xbmc/filesystem/CircularCache.h6
-rw-r--r--xbmc/filesystem/Directory.cpp4
-rw-r--r--xbmc/filesystem/FileCache.cpp16
-rw-r--r--xbmc/filesystem/FileCache.h22
-rw-r--r--xbmc/filesystem/NptXbmcFile.cpp6
-rw-r--r--xbmc/games/addons/GameClient.cpp5
-rw-r--r--xbmc/games/addons/GameClient.h6
-rw-r--r--xbmc/games/controllers/windows/GUIControllerList.cpp3
-rw-r--r--xbmc/games/controllers/windows/GUIControllerList.h6
-rw-r--r--xbmc/games/controllers/windows/GUIFeatureList.cpp8
-rw-r--r--xbmc/games/controllers/windows/GUIFeatureList.h8
-rw-r--r--xbmc/guilib/GUIControlProfiler.cpp6
-rw-r--r--xbmc/guilib/GUIControlProfiler.h8
-rw-r--r--xbmc/guilib/GUIIncludes.cpp8
-rw-r--r--xbmc/guilib/GUILabel.cpp23
-rw-r--r--xbmc/guilib/GUILabel.h4
-rw-r--r--xbmc/guilib/GUIRSSControl.cpp45
-rw-r--r--xbmc/guilib/GUIRSSControl.h2
-rw-r--r--xbmc/guilib/IGUIContainer.h6
-rw-r--r--xbmc/input/joysticks/JoystickEasterEgg.cpp2
-rw-r--r--xbmc/input/joysticks/JoystickEasterEgg.h2
-rw-r--r--xbmc/input/joysticks/generic/ButtonMapping.cpp11
-rw-r--r--xbmc/input/joysticks/generic/ButtonMapping.h13
-rw-r--r--xbmc/input/joysticks/generic/FeatureHandling.cpp15
-rw-r--r--xbmc/input/joysticks/generic/FeatureHandling.h20
-rw-r--r--xbmc/input/touch/generic/GenericTouchRotateDetector.cpp2
-rw-r--r--xbmc/input/touch/generic/GenericTouchRotateDetector.h2
-rw-r--r--xbmc/input/touch/generic/GenericTouchSwipeDetector.cpp4
-rw-r--r--xbmc/input/touch/generic/GenericTouchSwipeDetector.h4
-rw-r--r--xbmc/input/touch/generic/IGenericTouchGestureDetector.h4
-rw-r--r--xbmc/interfaces/generic/ILanguageInvoker.cpp6
-rw-r--r--xbmc/interfaces/generic/ILanguageInvoker.h4
-rw-r--r--xbmc/interfaces/info/InfoBool.cpp15
-rw-r--r--xbmc/interfaces/info/InfoBool.h7
-rw-r--r--xbmc/interfaces/python/PythonInvoker.cpp2
-rw-r--r--xbmc/interfaces/python/PythonInvoker.h2
-rw-r--r--xbmc/listproviders/DirectoryProvider.cpp8
-rw-r--r--xbmc/listproviders/DirectoryProvider.h6
-rw-r--r--xbmc/music/MusicInfoLoader.cpp5
-rw-r--r--xbmc/music/MusicInfoLoader.h4
-rw-r--r--xbmc/network/WakeOnAccess.cpp11
-rw-r--r--xbmc/network/WebServer.h16
-rw-r--r--xbmc/network/httprequesthandler/python/HTTPPythonInvoker.cpp7
-rw-r--r--xbmc/network/httprequesthandler/python/HTTPPythonInvoker.h2
-rw-r--r--xbmc/network/upnp/UPnPPlayer.cpp8
-rw-r--r--xbmc/network/upnp/UPnPPlayer.h4
-rw-r--r--xbmc/peripherals/addons/PeripheralAddon.cpp5
-rw-r--r--xbmc/peripherals/addons/PeripheralAddon.h4
-rw-r--r--xbmc/peripherals/bus/PeripheralBus.cpp1
-rw-r--r--xbmc/peripherals/bus/PeripheralBus.h3
-rw-r--r--xbmc/peripherals/devices/Peripheral.cpp3
-rw-r--r--xbmc/peripherals/devices/Peripheral.h6
-rw-r--r--xbmc/peripherals/devices/PeripheralCecAdapter.cpp6
-rw-r--r--xbmc/peripherals/devices/PeripheralCecAdapter.h4
-rw-r--r--xbmc/peripherals/devices/PeripheralJoystick.cpp9
-rw-r--r--xbmc/peripherals/devices/PeripheralJoystick.h12
-rw-r--r--xbmc/pictures/GUIWindowSlideShow.cpp9
-rw-r--r--xbmc/pictures/GUIWindowSlideShow.h12
-rw-r--r--xbmc/platform/android/activity/EventLoop.cpp4
-rw-r--r--xbmc/platform/android/activity/EventLoop.h2
-rw-r--r--xbmc/platform/android/media/drm/MediaDrmCryptoSession.cpp11
-rw-r--r--xbmc/platform/android/media/drm/MediaDrmCryptoSession.h8
-rw-r--r--xbmc/platform/android/network/ZeroconfBrowserAndroid.cpp4
-rw-r--r--xbmc/platform/android/network/ZeroconfBrowserAndroid.h2
-rw-r--r--xbmc/pvr/epg/EpgSearchPath.cpp4
-rw-r--r--xbmc/pvr/guilib/GUIEPGGridContainer.cpp36
-rw-r--r--xbmc/pvr/guilib/GUIEPGGridContainer.h72
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRBase.cpp9
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRBase.h3
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRChannels.cpp2
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRChannels.h2
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRSearch.cpp2
-rw-r--r--xbmc/pvr/windows/GUIWindowPVRSearch.h2
-rw-r--r--xbmc/settings/dialogs/GUIDialogSettingsBase.cpp9
-rw-r--r--xbmc/settings/dialogs/GUIDialogSettingsBase.h12
-rw-r--r--xbmc/settings/dialogs/GUIDialogSettingsManualBase.cpp3
-rw-r--r--xbmc/settings/dialogs/GUIDialogSettingsManualBase.h2
-rw-r--r--xbmc/settings/windows/GUIControlSettings.cpp6
-rw-r--r--xbmc/settings/windows/GUIControlSettings.h4
-rw-r--r--xbmc/threads/test/TestEvent.cpp8
-rw-r--r--xbmc/utils/BitstreamReader.cpp8
-rw-r--r--xbmc/utils/BitstreamReader.h2
-rw-r--r--xbmc/utils/BitstreamWriter.cpp8
-rw-r--r--xbmc/utils/BitstreamWriter.h4
-rw-r--r--xbmc/utils/JSONVariantParser.cpp7
-rw-r--r--xbmc/utils/ScraperUrl.h13
-rw-r--r--xbmc/utils/log.cpp4
-rw-r--r--xbmc/utils/log.h4
-rw-r--r--xbmc/utils/test/TestJobManager.cpp9
-rw-r--r--xbmc/video/VideoInfoDownloader.cpp4
-rw-r--r--xbmc/video/VideoInfoDownloader.h4
-rw-r--r--xbmc/windowing/android/VideoSyncAndroid.h5
-rw-r--r--xbmc/windowing/osx/VideoSyncOsx.h12
-rw-r--r--xbmc/windows/GUIWindowFileManager.cpp7
145 files changed, 423 insertions, 675 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 8e36231c21..b5865a5de9 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -1,4 +1,5 @@
Checks: "\
+ modernize-use-default-member-init,\
performance-faster-string-find,\
performance-for-range-copy,\
performance-implicit-conversion-in-loop,\
diff --git a/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm b/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm
index a5d2b3363f..e265142215 100644
--- a/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm
+++ b/tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm
@@ -89,9 +89,9 @@ private:
std::string m_address;
int m_port;
XBMCClientEventSequence m_sequence;
- CFRunLoopTimerRef m_timer;
- double m_sequence_timeout;
- int m_device_id;
+ CFRunLoopTimerRef m_timer = 0;
+ double m_sequence_timeout = 0.5;
+ int m_device_id = 150;
bool m_verbose_mode;
void populateEventMap();
void populateSequenceMap();
@@ -149,15 +149,12 @@ void XBMCClientWrapperImpl::restartTimer(){
CFRunLoopAddTimer(CFRunLoopGetCurrent(), m_timer, kCFRunLoopCommonModes);
}
-XBMCClientWrapperImpl::XBMCClientWrapperImpl(eRemoteMode f_mode, const std::string& fcr_address, int f_port, bool f_verbose_mode):
- m_mode(f_mode),
- m_address(fcr_address),
- m_port(f_port),
- m_timer(0),
- m_sequence_timeout(0.5),
- m_device_id(150),
- m_verbose_mode(f_verbose_mode)
- {
+XBMCClientWrapperImpl::XBMCClientWrapperImpl(eRemoteMode f_mode,
+ const std::string& fcr_address,
+ int f_port,
+ bool f_verbose_mode)
+ : m_mode(f_mode), m_address(fcr_address), m_port(f_port), m_verbose_mode(f_verbose_mode)
+{
if(m_mode == MULTIREMOTE_MODE){
if(m_verbose_mode)
NSLog(@"XBMCClientWrapperImpl started in multiremote mode sending to address %s, port %i", fcr_address.c_str(), f_port);
diff --git a/tools/depends/native/TexturePacker/src/XBTFWriter.cpp b/tools/depends/native/TexturePacker/src/XBTFWriter.cpp
index bb7f40ea20..53add01dc9 100644
--- a/tools/depends/native/TexturePacker/src/XBTFWriter.cpp
+++ b/tools/depends/native/TexturePacker/src/XBTFWriter.cpp
@@ -37,7 +37,7 @@
#define WRITE_U32(i, file) { uint32_t _n = Endian_SwapLE32(i); fwrite(&_n, 4, 1, file); }
#define WRITE_U64(i, file) { uint64_t _n = i; _n = Endian_SwapLE64(i); fwrite(&_n, 8, 1, file); }
-CXBTFWriter::CXBTFWriter(const std::string& outputFile) : m_outputFile(outputFile), m_file(nullptr)
+CXBTFWriter::CXBTFWriter(const std::string& outputFile) : m_outputFile(outputFile)
{ }
CXBTFWriter::~CXBTFWriter()
diff --git a/tools/depends/native/TexturePacker/src/XBTFWriter.h b/tools/depends/native/TexturePacker/src/XBTFWriter.h
index ab639fcdf3..a17954b89c 100644
--- a/tools/depends/native/TexturePacker/src/XBTFWriter.h
+++ b/tools/depends/native/TexturePacker/src/XBTFWriter.h
@@ -41,7 +41,7 @@ private:
void Cleanup();
std::string m_outputFile;
- FILE* m_file;
+ FILE* m_file = nullptr;
std::vector<uint8_t> m_data;
};
diff --git a/xbmc/CueDocument.cpp b/xbmc/CueDocument.cpp
index c128874bd1..674a94aa51 100644
--- a/xbmc/CueDocument.cpp
+++ b/xbmc/CueDocument.cpp
@@ -112,11 +112,7 @@ class BufferReader
: public CueReader
{
public:
- explicit BufferReader(const std::string &strContent)
- : m_data(strContent)
- , m_pos(0)
- {
- }
+ explicit BufferReader(const std::string& strContent) : m_data(strContent) {}
bool ReadLine(std::string &line) override
{
// Read the next line.
@@ -145,7 +141,7 @@ public:
}
private:
std::string m_data;
- size_t m_pos;
+ size_t m_pos = 0;
};
CCueDocument::~CCueDocument() = default;
diff --git a/xbmc/ServiceBroker.cpp b/xbmc/ServiceBroker.cpp
index eaed83f546..24a7c8804e 100644
--- a/xbmc/ServiceBroker.cpp
+++ b/xbmc/ServiceBroker.cpp
@@ -21,7 +21,6 @@
using namespace KODI;
CServiceBroker::CServiceBroker()
- : m_pGUI(nullptr), m_pWinSystem(nullptr), m_pActiveAE(nullptr), m_decoderFilterManager(nullptr)
{
}
diff --git a/xbmc/ServiceBroker.h b/xbmc/ServiceBroker.h
index 9aaec4c98b..3c02a70a50 100644
--- a/xbmc/ServiceBroker.h
+++ b/xbmc/ServiceBroker.h
@@ -223,12 +223,12 @@ private:
std::shared_ptr<CAppParams> m_appParams;
std::unique_ptr<CLog> m_logging;
std::shared_ptr<ANNOUNCEMENT::CAnnouncementManager> m_pAnnouncementManager;
- CGUIComponent* m_pGUI;
- CWinSystemBase* m_pWinSystem;
- IAE* m_pActiveAE;
+ CGUIComponent* m_pGUI = nullptr;
+ CWinSystemBase* m_pWinSystem = nullptr;
+ IAE* m_pActiveAE = nullptr;
std::shared_ptr<CAppInboundProtocol> m_pAppPort;
std::shared_ptr<CSettingsComponent> m_pSettingsComponent;
- CDecoderFilterManager* m_decoderFilterManager;
+ CDecoderFilterManager* m_decoderFilterManager = nullptr;
std::shared_ptr<CCPUInfo> m_cpuInfo;
std::shared_ptr<CTextureCache> m_textureCache;
std::shared_ptr<CJobManager> m_jobManager;
diff --git a/xbmc/addons/AddonStatusHandler.cpp b/xbmc/addons/AddonStatusHandler.cpp
index 3c6f478894..b9a3f4fd16 100644
--- a/xbmc/addons/AddonStatusHandler.cpp
+++ b/xbmc/addons/AddonStatusHandler.cpp
@@ -45,8 +45,7 @@ CAddonStatusHandler::CAddonStatusHandler(const std::string& addonID,
ADDON_STATUS status,
bool sameThread)
: CThread(("AddonStatus " + std::to_string(instanceId) + "@" + addonID).c_str()),
- m_instanceId(instanceId),
- m_status(ADDON_STATUS_UNKNOWN)
+ m_instanceId(instanceId)
{
//! @todo The status handled CAddonStatusHandler by is related to the class, not the instance
//! having CAddonMgr construct an instance makes no sense
diff --git a/xbmc/addons/AddonStatusHandler.h b/xbmc/addons/AddonStatusHandler.h
index 3254ea080e..0002f1f9d2 100644
--- a/xbmc/addons/AddonStatusHandler.h
+++ b/xbmc/addons/AddonStatusHandler.h
@@ -40,6 +40,6 @@ namespace ADDON
static CCriticalSection m_critSection;
const uint32_t m_instanceId;
AddonPtr m_addon;
- ADDON_STATUS m_status;
+ ADDON_STATUS m_status = ADDON_STATUS_UNKNOWN;
};
}
diff --git a/xbmc/addons/Scraper.cpp b/xbmc/addons/Scraper.cpp
index 14c555f33b..30c22473af 100644
--- a/xbmc/addons/Scraper.cpp
+++ b/xbmc/addons/Scraper.cpp
@@ -122,10 +122,7 @@ static void CheckScraperError(const TiXmlElement *pxeRoot)
}
CScraper::CScraper(const AddonInfoPtr& addonInfo, AddonType addonType)
- : CAddon(addonInfo, addonType),
- m_fLoaded(false),
- m_requiressettings(false),
- m_pathContent(CONTENT_NONE)
+ : CAddon(addonInfo, addonType)
{
m_requiressettings = addonInfo->Type(addonType)->GetValue("@requiressettings").asBoolean();
diff --git a/xbmc/addons/Scraper.h b/xbmc/addons/Scraper.h
index d9f72868bf..62b0d38139 100644
--- a/xbmc/addons/Scraper.h
+++ b/xbmc/addons/Scraper.h
@@ -170,11 +170,11 @@ private:
XFILE::CCurlFile& http,
const std::vector<std::string>* extras);
- bool m_fLoaded;
+ bool m_fLoaded = false;
bool m_isPython = false;
- bool m_requiressettings;
+ bool m_requiressettings = false;
CDateTimeSpan m_persistence;
- CONTENT_TYPE m_pathContent;
+ CONTENT_TYPE m_pathContent = CONTENT_NONE;
CScraperParser m_parser;
};
diff --git a/xbmc/addons/VFSEntry.cpp b/xbmc/addons/VFSEntry.cpp
index 063ba2514b..675f23fc09 100644
--- a/xbmc/addons/VFSEntry.cpp
+++ b/xbmc/addons/VFSEntry.cpp
@@ -573,8 +573,7 @@ bool CVFSEntry::ContainsFiles(const CURL& url, CFileItemList& items)
return true;
}
-CVFSEntryIFileWrapper::CVFSEntryIFileWrapper(VFSEntryPtr ptr)
- : m_context(nullptr), m_addon(std::move(ptr))
+CVFSEntryIFileWrapper::CVFSEntryIFileWrapper(VFSEntryPtr ptr) : m_addon(std::move(ptr))
{
}
diff --git a/xbmc/addons/VFSEntry.h b/xbmc/addons/VFSEntry.h
index f600ac1d82..c11fca05da 100644
--- a/xbmc/addons/VFSEntry.h
+++ b/xbmc/addons/VFSEntry.h
@@ -191,7 +191,7 @@ protected:
//! \param[in] url2 New URL of file.
bool Rename(const CURL& url, const CURL& url2) override;
protected:
- void* m_context; //!< Opaque add-on specific context for opened file.
+ void* m_context = nullptr; //!< Opaque add-on specific context for opened file.
VFSEntryPtr m_addon; //!< Pointer to wrapped CVFSEntry.
};
diff --git a/xbmc/addons/Webinterface.cpp b/xbmc/addons/Webinterface.cpp
index 75af3b2c9d..0b9edd9389 100644
--- a/xbmc/addons/Webinterface.cpp
+++ b/xbmc/addons/Webinterface.cpp
@@ -16,9 +16,7 @@
using namespace ADDON;
CWebinterface::CWebinterface(const AddonInfoPtr& addonInfo)
- : CAddon(addonInfo, AddonType::WEB_INTERFACE),
- m_type(WebinterfaceTypeStatic),
- m_entryPoint(WEBINTERFACE_DEFAULT_ENTRY_POINT)
+ : CAddon(addonInfo, AddonType::WEB_INTERFACE), m_entryPoint(WEBINTERFACE_DEFAULT_ENTRY_POINT)
{
// determine the type of the webinterface
std::string webinterfaceType = Type(AddonType::WEB_INTERFACE)->GetValue("@type").asString();
diff --git a/xbmc/addons/Webinterface.h b/xbmc/addons/Webinterface.h
index 7a0ea7c87e..016496eb75 100644
--- a/xbmc/addons/Webinterface.h
+++ b/xbmc/addons/Webinterface.h
@@ -32,7 +32,7 @@ namespace ADDON
std::string GetBaseLocation() const;
private:
- WebinterfaceType m_type;
+ WebinterfaceType m_type = WebinterfaceTypeStatic;
std::string m_entryPoint;
};
}
diff --git a/xbmc/addons/interfaces/gui/Window.cpp b/xbmc/addons/interfaces/gui/Window.cpp
index 307c339f2b..aa4e185656 100644
--- a/xbmc/addons/interfaces/gui/Window.cpp
+++ b/xbmc/addons/interfaces/gui/Window.cpp
@@ -1167,15 +1167,7 @@ int Interface_GUIWindow::GetNextAvailableWindowId()
CGUIAddonWindow::CGUIAddonWindow(int id, const std::string& strXML, CAddonDll* addon, bool isMedia)
: CGUIMediaWindow(id, strXML.c_str()),
- m_clientHandle{nullptr},
- CBOnInit{nullptr},
- CBOnFocus{nullptr},
- CBOnClick{nullptr},
- CBOnAction{nullptr},
- CBGetContextButtons{nullptr},
- CBOnContextButton{nullptr},
m_windowId(id),
- m_oldWindowId(0),
m_actionEvent(true),
m_addon(addon),
m_isMedia(isMedia)
@@ -1445,9 +1437,8 @@ void CGUIAddonWindow::SetupShares()
UpdateButtons();
}
-
CGUIAddonWindowDialog::CGUIAddonWindowDialog(int id, const std::string& strXML, CAddonDll* addon)
- : CGUIAddonWindow(id, strXML, addon, false), m_bRunning(false)
+ : CGUIAddonWindow(id, strXML, addon, false)
{
}
diff --git a/xbmc/addons/interfaces/gui/Window.h b/xbmc/addons/interfaces/gui/Window.h
index dad0737cb7..470c21e025 100644
--- a/xbmc/addons/interfaces/gui/Window.h
+++ b/xbmc/addons/interfaces/gui/Window.h
@@ -235,19 +235,21 @@ extern "C"
void SetupShares() override;
/* kodi to addon callback function addresses */
- KODI_GUI_CLIENT_HANDLE m_clientHandle;
- bool (*CBOnInit)(KODI_GUI_CLIENT_HANDLE cbhdl);
- bool (*CBOnFocus)(KODI_GUI_CLIENT_HANDLE cbhdl, int controlId);
- bool (*CBOnClick)(KODI_GUI_CLIENT_HANDLE cbhdl, int controlId);
- bool (*CBOnAction)(KODI_GUI_CLIENT_HANDLE cbhdl, ADDON_ACTION actionId);
+ KODI_GUI_CLIENT_HANDLE m_clientHandle = nullptr;
+ bool (*CBOnInit)(KODI_GUI_CLIENT_HANDLE cbhdl) = nullptr;
+ bool (*CBOnFocus)(KODI_GUI_CLIENT_HANDLE cbhdl, int controlId) = nullptr;
+ bool (*CBOnClick)(KODI_GUI_CLIENT_HANDLE cbhdl, int controlId) = nullptr;
+ bool (*CBOnAction)(KODI_GUI_CLIENT_HANDLE cbhdl, ADDON_ACTION actionId) = nullptr;
void (*CBGetContextButtons)(KODI_GUI_CLIENT_HANDLE cbhdl,
int itemNumber,
gui_context_menu_pair* buttons,
- unsigned int* size);
- bool (*CBOnContextButton)(KODI_GUI_CLIENT_HANDLE cbhdl, int itemNumber, unsigned int button);
+ unsigned int* size) = nullptr;
+ bool (*CBOnContextButton)(KODI_GUI_CLIENT_HANDLE cbhdl,
+ int itemNumber,
+ unsigned int button) = nullptr;
const int m_windowId;
- int m_oldWindowId;
+ int m_oldWindowId = 0;
private:
void WaitForActionEvent(unsigned int timeout);
@@ -271,7 +273,7 @@ extern "C"
void Show_Internal(bool show = true);
private:
- bool m_bRunning;
+ bool m_bRunning = false;
};
} /* namespace ADDON */
diff --git a/xbmc/addons/interfaces/gui/controls/Rendering.cpp b/xbmc/addons/interfaces/gui/controls/Rendering.cpp
index a26a27f9c3..2030ece0bb 100644
--- a/xbmc/addons/interfaces/gui/controls/Rendering.cpp
+++ b/xbmc/addons/interfaces/gui/controls/Rendering.cpp
@@ -82,16 +82,8 @@ void Interface_GUIControlAddonRendering::destroy(KODI_HANDLE kodiBase,
Interface_GUIGeneral::unlock();
}
-
CGUIAddonRenderingControl::CGUIAddonRenderingControl(CGUIRenderingControl* control)
- : CBCreate{nullptr},
- CBRender{nullptr},
- CBStop{nullptr},
- CBDirty{nullptr},
- m_clientHandle{nullptr},
- m_addon{nullptr},
- m_control{control},
- m_refCount{1}
+ : m_control{control}
{
}
diff --git a/xbmc/addons/interfaces/gui/controls/Rendering.h b/xbmc/addons/interfaces/gui/controls/Rendering.h
index dbd82d8602..f96df90c22 100644
--- a/xbmc/addons/interfaces/gui/controls/Rendering.h
+++ b/xbmc/addons/interfaces/gui/controls/Rendering.h
@@ -74,15 +74,16 @@ extern "C"
virtual void Delete();
protected:
- bool (*CBCreate)(KODI_GUI_CLIENT_HANDLE cbhdl, int x, int y, int w, int h, void* device);
- void (*CBRender)(KODI_GUI_CLIENT_HANDLE cbhdl);
- void (*CBStop)(KODI_GUI_CLIENT_HANDLE cbhdl);
- bool (*CBDirty)(KODI_GUI_CLIENT_HANDLE cbhdl);
+ bool (*CBCreate)(KODI_GUI_CLIENT_HANDLE cbhdl, int x, int y, int w, int h, void* device) =
+ nullptr;
+ void (*CBRender)(KODI_GUI_CLIENT_HANDLE cbhdl) = nullptr;
+ void (*CBStop)(KODI_GUI_CLIENT_HANDLE cbhdl) = nullptr;
+ bool (*CBDirty)(KODI_GUI_CLIENT_HANDLE cbhdl) = nullptr;
- KODI_GUI_CLIENT_HANDLE m_clientHandle;
- CAddonDll* m_addon;
+ KODI_GUI_CLIENT_HANDLE m_clientHandle = nullptr;
+ CAddonDll* m_addon = nullptr;
CGUIRenderingControl* m_control;
- int m_refCount;
+ int m_refCount = 1;
};
} /* namespace ADDON */
diff --git a/xbmc/addons/settings/AddonSettings.cpp b/xbmc/addons/settings/AddonSettings.cpp
index 83bbdd9152..efcdb4ca7e 100644
--- a/xbmc/addons/settings/AddonSettings.cpp
+++ b/xbmc/addons/settings/AddonSettings.cpp
@@ -158,7 +158,6 @@ CAddonSettings::CAddonSettings(const std::shared_ptr<const IAddon>& addon,
m_addonPath(addon->Path()),
m_addonProfile(addon->Profile()),
m_instanceId(instanceId),
- m_unidentifiedSettingId(0),
m_unknownSettingLabelId(UnknownSettingLabelIdStart),
m_logger(CServiceBroker::GetLogging().GetLogger(
StringUtils::Format("CAddonSettings[{}@{}]", m_instanceId, m_addonId)))
diff --git a/xbmc/addons/settings/AddonSettings.h b/xbmc/addons/settings/AddonSettings.h
index ffaf6e398f..1a6524a4df 100644
--- a/xbmc/addons/settings/AddonSettings.h
+++ b/xbmc/addons/settings/AddonSettings.h
@@ -193,7 +193,7 @@ private:
const std::string m_addonProfile;
const AddonInstanceId m_instanceId{ADDON_SETTINGS_ID};
- uint32_t m_unidentifiedSettingId;
+ uint32_t m_unidentifiedSettingId = 0;
int m_unknownSettingLabelId;
std::map<int, std::string> m_unknownSettingLabels;
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.cpp
index ee1ed70c2b..42706b5454 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.cpp
@@ -20,11 +20,8 @@ extern "C" {
using namespace ActiveAE;
using namespace XFILE;
-CActiveAESound::CActiveAESound(const std::string &filename, CActiveAE *ae) :
- IAESound (filename),
- m_filename (filename),
- m_volume (1.0f ),
- m_channel (AE_CH_NULL)
+CActiveAESound::CActiveAESound(const std::string& filename, CActiveAE* ae)
+ : IAESound(filename), m_filename(filename)
{
m_orig_sound = NULL;
m_dst_sound = NULL;
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.h
index 0bde021f4a..69fac022bf 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.h
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESound.h
@@ -60,8 +60,8 @@ protected:
XFILE::CFile *m_pFile;
bool m_isSeekPossible;
int m_fileSize;
- float m_volume;
- AEChannel m_channel;
+ float m_volume = 1.0f;
+ AEChannel m_channel = AE_CH_NULL;
CSoundPacket *m_orig_sound;
CSoundPacket *m_dst_sound;
diff --git a/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.cpp b/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.cpp
index 4074ee7aec..75952610f3 100644
--- a/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.cpp
@@ -41,9 +41,7 @@ static enum AEChannel CAChannelMap[CA_MAX_CHANNELS + 1] = {
};
AEDeviceEnumerationOSX::AEDeviceEnumerationOSX(AudioDeviceID deviceID)
-: m_deviceID(deviceID)
-, m_isPlanar(false)
-, m_caDevice(deviceID)
+ : m_deviceID(deviceID), m_caDevice(deviceID)
{
Enumerate();
}
diff --git a/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.h b/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.h
index 7baae8f3aa..7184f9be73 100644
--- a/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.h
+++ b/xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.h
@@ -228,7 +228,7 @@ private:
std::string getExtraDisplayNameForStream(UInt32 streamIdx) const;
AudioDeviceID m_deviceID;
- bool m_isPlanar;
+ bool m_isPlanar = false;
std::string m_deviceName;
typedef struct
diff --git a/xbmc/cores/RetroPlayer/playback/GameLoop.cpp b/xbmc/cores/RetroPlayer/playback/GameLoop.cpp
index c8862d2caf..1abf258ce7 100644
--- a/xbmc/cores/RetroPlayer/playback/GameLoop.cpp
+++ b/xbmc/cores/RetroPlayer/playback/GameLoop.cpp
@@ -19,12 +19,7 @@ using namespace std::chrono_literals;
#define FOREVER_MS (7 * 24 * 60 * 60 * 1000) // 1 week is large enough
CGameLoop::CGameLoop(IGameLoopCallback* callback, double fps)
- : CThread("GameLoop"),
- m_callback(callback),
- m_fps(fps ? fps : DEFAULT_FPS),
- m_speedFactor(0.0),
- m_lastFrameMs(0.0),
- m_adjustTime(0.0)
+ : CThread("GameLoop"), m_callback(callback), m_fps(fps ? fps : DEFAULT_FPS), m_speedFactor(0.0)
{
}
diff --git a/xbmc/cores/RetroPlayer/playback/GameLoop.h b/xbmc/cores/RetroPlayer/playback/GameLoop.h
index e4fbcff5f9..4ed8c87fe5 100644
--- a/xbmc/cores/RetroPlayer/playback/GameLoop.h
+++ b/xbmc/cores/RetroPlayer/playback/GameLoop.h
@@ -61,8 +61,8 @@ private:
IGameLoopCallback* const m_callback;
const double m_fps;
std::atomic<double> m_speedFactor;
- double m_lastFrameMs;
- mutable double m_adjustTime;
+ double m_lastFrameMs = 0.0;
+ mutable double m_adjustTime = 0.0;
CEvent m_sleepEvent;
};
} // namespace RETRO
diff --git a/xbmc/cores/RetroPlayer/playback/ReversiblePlayback.cpp b/xbmc/cores/RetroPlayer/playback/ReversiblePlayback.cpp
index 653b209a93..8148dfd58a 100644
--- a/xbmc/cores/RetroPlayer/playback/ReversiblePlayback.cpp
+++ b/xbmc/cores/RetroPlayer/playback/ReversiblePlayback.cpp
@@ -44,13 +44,7 @@ CReversiblePlayback::CReversiblePlayback(GAME::CGameClient* gameClient,
m_cheevos(cheevos),
m_guiMessenger(guiMessenger),
m_gameLoop(this, fps),
- m_savestateDatabase(new CSavestateDatabase),
- m_totalFrameCount(0),
- m_pastFrameCount(0),
- m_futureFrameCount(0),
- m_playTimeMs(0),
- m_totalTimeMs(0),
- m_cacheTimeMs(0)
+ m_savestateDatabase(new CSavestateDatabase)
{
UpdateMemoryStream();
diff --git a/xbmc/cores/RetroPlayer/playback/ReversiblePlayback.h b/xbmc/cores/RetroPlayer/playback/ReversiblePlayback.h
index bd2fc3717e..9097b6f0e6 100644
--- a/xbmc/cores/RetroPlayer/playback/ReversiblePlayback.h
+++ b/xbmc/cores/RetroPlayer/playback/ReversiblePlayback.h
@@ -98,12 +98,12 @@ private:
CCriticalSection m_savestateMutex;
// Playback stats
- uint64_t m_totalFrameCount;
- uint64_t m_pastFrameCount;
- uint64_t m_futureFrameCount;
- unsigned int m_playTimeMs;
- unsigned int m_totalTimeMs;
- unsigned int m_cacheTimeMs;
+ uint64_t m_totalFrameCount = 0;
+ uint64_t m_pastFrameCount = 0;
+ uint64_t m_futureFrameCount = 0;
+ unsigned int m_playTimeMs = 0;
+ unsigned int m_totalTimeMs = 0;
+ unsigned int m_cacheTimeMs = 0;
};
} // namespace RETRO
} // namespace KODI
diff --git a/xbmc/cores/RetroPlayer/streams/RetroPlayerAudio.cpp b/xbmc/cores/RetroPlayer/streams/RetroPlayerAudio.cpp
index d4e5a052db..3bad9d60ad 100644
--- a/xbmc/cores/RetroPlayer/streams/RetroPlayerAudio.cpp
+++ b/xbmc/cores/RetroPlayer/streams/RetroPlayerAudio.cpp
@@ -25,7 +25,7 @@ using namespace RETRO;
const double MAX_DELAY = 0.3; // seconds
CRetroPlayerAudio::CRetroPlayerAudio(CRPProcessInfo& processInfo)
- : m_processInfo(processInfo), m_pAudioStream(nullptr), m_bAudioEnabled(true)
+ : m_processInfo(processInfo), m_pAudioStream(nullptr)
{
CLog::Log(LOGDEBUG, "RetroPlayer[AUDIO]: Initializing audio");
}
diff --git a/xbmc/cores/RetroPlayer/streams/RetroPlayerAudio.h b/xbmc/cores/RetroPlayer/streams/RetroPlayerAudio.h
index 184fd54913..1a5060a19b 100644
--- a/xbmc/cores/RetroPlayer/streams/RetroPlayerAudio.h
+++ b/xbmc/cores/RetroPlayer/streams/RetroPlayerAudio.h
@@ -61,7 +61,7 @@ public:
private:
CRPProcessInfo& m_processInfo;
IAE::StreamPtr m_pAudioStream;
- bool m_bAudioEnabled;
+ bool m_bAudioEnabled = true;
};
} // namespace RETRO
} // namespace KODI
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecAndroidMediaCodec.cpp
index d5704fe5ac..6d882f177b 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecAndroidMediaCodec.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecAndroidMediaCodec.cpp
@@ -72,18 +72,8 @@ static bool IsDecoderWhitelisted(const std::string &name)
/****************************/
-CDVDAudioCodecAndroidMediaCodec::CDVDAudioCodecAndroidMediaCodec(CProcessInfo &processInfo) :
- CDVDAudioCodec(processInfo),
- m_formatname("mediacodec"),
- m_opened(false),
- m_codecIsFed(false),
- m_samplerate(0),
- m_channels(0),
- m_buffer(NULL),
- m_bufferSize(0),
- m_bufferUsed(0),
- m_currentPts(DVD_NOPTS_VALUE),
- m_crypto(nullptr)
+CDVDAudioCodecAndroidMediaCodec::CDVDAudioCodecAndroidMediaCodec(CProcessInfo& processInfo)
+ : CDVDAudioCodec(processInfo), m_formatname("mediacodec"), m_buffer(NULL)
{
}
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecAndroidMediaCodec.h b/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecAndroidMediaCodec.h
index f084765552..cdb2e7f573 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecAndroidMediaCodec.h
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecAndroidMediaCodec.h
@@ -60,16 +60,16 @@ protected:
std::string m_mime;
std::string m_codecname;
std::string m_formatname;
- bool m_opened, m_codecIsFed;
- int m_samplerate;
- int m_channels;
+ bool m_opened = false, m_codecIsFed = false;
+ int m_samplerate = 0;
+ int m_channels = 0;
uint8_t* m_buffer;
- int m_bufferSize;
- int m_bufferUsed;
+ int m_bufferSize = 0;
+ int m_bufferUsed = 0;
AEAudioFormat m_format;
- double m_currentPts;
+ double m_currentPts = DVD_NOPTS_VALUE;
std::shared_ptr<CJNIMediaCodec> m_codec;
- CJNIMediaCrypto *m_crypto;
+ CJNIMediaCrypto* m_crypto = nullptr;
std::shared_ptr<CDVDAudioCodec> m_decryptCodec;
};
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.cpp
index daf64ea67a..71f530c484 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.cpp
@@ -86,9 +86,7 @@ CAddonVideoCodec::CAddonVideoCodec(CProcessInfo& processInfo,
KODI_HANDLE parentInstance)
: CDVDVideoCodec(processInfo),
IAddonInstanceHandler(
- ADDON_INSTANCE_VIDEOCODEC, addonInfo, ADDON::ADDON_INSTANCE_ID_UNUSED, parentInstance),
- m_codecFlags(0),
- m_displayAspect(0.0f)
+ ADDON_INSTANCE_VIDEOCODEC, addonInfo, ADDON::ADDON_INSTANCE_ID_UNUSED, parentInstance)
{
m_ifc.videocodec = new AddonInstance_VideoCodec;
m_ifc.videocodec->props = new AddonProps_VideoCodec();
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.h
index 8e3015c125..6e6b541b73 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.h
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AddonVideoCodec.h
@@ -47,8 +47,8 @@ private:
static bool get_frame_buffer(void* kodiInstance, VIDEOCODEC_PICTURE *picture);
static void release_frame_buffer(void* kodiInstance, KODI_HANDLE videoBufferHandle);
- int m_codecFlags;
+ int m_codecFlags = 0;
VIDEOCODEC_FORMAT m_formats[VIDEOCODEC_FORMAT_MAXFORMATS + 1];
- float m_displayAspect;
+ float m_displayAspect = 0.0f;
unsigned int m_width, m_height;
};
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
index 5ad2ce4b2c..0470092aac 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
@@ -306,20 +306,13 @@ void CMediaCodecVideoBufferPool::ReleaseMediaCodecBuffers()
/*****************************************************************************/
/*****************************************************************************/
-CDVDVideoCodecAndroidMediaCodec::CDVDVideoCodecAndroidMediaCodec(CProcessInfo &processInfo, bool surface_render)
-: CDVDVideoCodec(processInfo)
-, m_formatname("mediacodec")
-, m_opened(false)
-, m_jnivideoview(nullptr)
-, m_textureId(0)
-, m_OutputDuration(0)
-, m_fpsDuration(0)
-, m_lastPTS(-1)
-, m_dtsShift(DVD_NOPTS_VALUE)
-, m_bitstream(nullptr)
-, m_render_surface(surface_render)
-, m_mpeg2_sequence(nullptr)
-, m_useDTSforPTS(false)
+CDVDVideoCodecAndroidMediaCodec::CDVDVideoCodecAndroidMediaCodec(CProcessInfo& processInfo,
+ bool surface_render)
+ : CDVDVideoCodec(processInfo),
+ m_formatname("mediacodec"),
+ m_jnivideoview(nullptr),
+ m_bitstream(nullptr),
+ m_render_surface(surface_render)
{
m_videobuffer.Reset();
}
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h
index a43fe771f2..4192459cc4 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h
@@ -153,14 +153,14 @@ protected:
std::string m_codecname;
int m_colorFormat;
std::string m_formatname;
- bool m_opened;
+ bool m_opened = false;
bool m_needSecureDecoder = false;
int m_codecControlFlags;
int m_state;
std::shared_ptr<jni::CJNIXBMCVideoView> m_jnivideoview;
CJNISurface m_jnivideosurface;
- unsigned int m_textureId;
+ unsigned int m_textureId = 0;
std::shared_ptr<CJNIMediaCodec> m_codec;
CJNIMediaCrypto* m_crypto = nullptr;
std::shared_ptr<CJNISurfaceTexture> m_surfaceTexture;
@@ -169,10 +169,10 @@ protected:
amc_demux m_demux_pkt;
std::shared_ptr<CMediaCodecVideoBufferPool> m_videoBufferPool;
- uint32_t m_OutputDuration, m_fpsDuration;
- int64_t m_lastPTS;
+ uint32_t m_OutputDuration = 0, m_fpsDuration = 0;
+ int64_t m_lastPTS = -1;
int64_t m_invalidPTSValue = 0;
- double m_dtsShift;
+ double m_dtsShift = DVD_NOPTS_VALUE;
static std::atomic<bool> m_InstanceGuard;
@@ -181,10 +181,10 @@ protected:
int m_indexInputBuffer;
bool m_render_surface;
- mpeg2_sequence* m_mpeg2_sequence;
+ mpeg2_sequence* m_mpeg2_sequence = nullptr;
int m_src_offset[4];
int m_src_stride[4];
- bool m_useDTSforPTS;
+ bool m_useDTSforPTS = false;
// CJNISurfaceHolderCallback interface
public:
diff --git a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxVobsub.h b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxVobsub.h
index c82b6a1a00..84e5651e8e 100644
--- a/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxVobsub.h
+++ b/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxVobsub.h
@@ -42,11 +42,9 @@ private:
: public CDemuxStreamSubtitle
{
public:
- explicit CStream(CDVDDemuxVobsub* parent)
- : m_discard(false), m_parent(parent)
- {}
+ explicit CStream(CDVDDemuxVobsub* parent) : m_parent(parent) {}
- bool m_discard;
+ bool m_discard = false;
CDVDDemuxVobsub* m_parent;
};
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.cpp b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.cpp
index 00199b6503..1f1622318d 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.cpp
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.cpp
@@ -19,7 +19,6 @@
CInputStreamPVRBase::CInputStreamPVRBase(IVideoPlayer* pPlayer, const CFileItem& fileitem)
: CDVDInputStream(DVDSTREAM_TYPE_PVRMANAGER, fileitem),
- m_eof(true),
m_StreamProps(new PVR_STREAM_PROPERTIES()),
m_client(CServiceBroker::GetPVRManager().GetClient(fileitem))
{
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.h b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.h
index b42f742f70..67b5d32d1c 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.h
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRBase.h
@@ -76,7 +76,7 @@ protected:
virtual bool CanPausePVRStream() = 0;
virtual bool CanSeekPVRStream() = 0;
- bool m_eof;
+ bool m_eof = true;
std::shared_ptr<PVR_STREAM_PROPERTIES> m_StreamProps;
std::map<int, std::shared_ptr<CDemuxStream>> m_streamMap;
std::shared_ptr<PVR::CPVRClient> m_client;
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRChannel.cpp b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRChannel.cpp
index b2cde6108f..8ac46bdb1d 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRChannel.cpp
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRChannel.cpp
@@ -17,8 +17,7 @@
using namespace PVR;
CInputStreamPVRChannel::CInputStreamPVRChannel(IVideoPlayer* pPlayer, const CFileItem& fileitem)
- : CInputStreamPVRBase(pPlayer, fileitem),
- m_bDemuxActive(false)
+ : CInputStreamPVRBase(pPlayer, fileitem)
{
}
diff --git a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRChannel.h b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRChannel.h
index d8d8bebd6e..e95fb208b2 100644
--- a/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRChannel.h
+++ b/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamPVRChannel.h
@@ -29,5 +29,5 @@ protected:
bool CanSeekPVRStream() override;
private:
- bool m_bDemuxActive;
+ bool m_bDemuxActive = false;
};
diff --git a/xbmc/cores/VideoPlayer/DVDMessage.cpp b/xbmc/cores/VideoPlayer/DVDMessage.cpp
index 34e807601c..c0665a7901 100644
--- a/xbmc/cores/VideoPlayer/DVDMessage.cpp
+++ b/xbmc/cores/VideoPlayer/DVDMessage.cpp
@@ -24,10 +24,10 @@ class CDVDMsgGeneralSynchronizePriv
{
public:
CDVDMsgGeneralSynchronizePriv(std::chrono::milliseconds timeout, unsigned int sources)
- : sources(sources), reached(0), m_timer(timeout)
+ : sources(sources), m_timer(timeout)
{}
unsigned int sources;
- unsigned int reached;
+ unsigned int reached = 0;
CCriticalSection section;
XbmcThreads::ConditionVariable condition;
XbmcThreads::EndTime<> m_timer;
diff --git a/xbmc/cores/paplayer/PAPlayer.cpp b/xbmc/cores/paplayer/PAPlayer.cpp
index 05bf906eb3..496596efce 100644
--- a/xbmc/cores/paplayer/PAPlayer.cpp
+++ b/xbmc/cores/paplayer/PAPlayer.cpp
@@ -41,20 +41,8 @@ using namespace std::chrono_literals;
// Supporting all open audio codec standards.
// First one being nullsoft's nsv audio decoder format
-PAPlayer::PAPlayer(IPlayerCallback& callback) :
- IPlayer(callback),
- CThread("PAPlayer"),
- m_signalSpeedChange(false),
- m_playbackSpeed(1 ),
- m_isPlaying(false),
- m_isPaused(false),
- m_isFinished(false),
- m_defaultCrossfadeMS (0),
- m_upcomingCrossfadeMS(0),
- m_audioCallback(NULL ),
- m_jobCounter(0),
- m_newForcedPlayerTime(-1),
- m_newForcedTotalTime (-1)
+PAPlayer::PAPlayer(IPlayerCallback& callback)
+ : IPlayer(callback), CThread("PAPlayer"), m_playbackSpeed(1), m_audioCallback(NULL)
{
memset(&m_playerGUIData, 0, sizeof(m_playerGUIData));
m_processInfo.reset(CProcessInfo::CreateInstance());
diff --git a/xbmc/cores/paplayer/PAPlayer.h b/xbmc/cores/paplayer/PAPlayer.h
index fe2489d2c5..c2a77dd84a 100644
--- a/xbmc/cores/paplayer/PAPlayer.h
+++ b/xbmc/cores/paplayer/PAPlayer.h
@@ -111,15 +111,15 @@ private:
typedef std::list<StreamInfo*> StreamList;
- bool m_signalSpeedChange; /* true if OnPlaybackSpeedChange needs to be called */
+ bool m_signalSpeedChange = false; /* true if OnPlaybackSpeedChange needs to be called */
bool m_signalStarted = true;
std::atomic_int m_playbackSpeed; /* the playback speed (1 = normal) */
- bool m_isPlaying;
- bool m_isPaused;
- bool m_isFinished; /* if there are no more songs in the queue */
+ bool m_isPlaying = false;
+ bool m_isPaused = false;
+ bool m_isFinished = false; /* if there are no more songs in the queue */
bool m_fullScreen;
- unsigned int m_defaultCrossfadeMS; /* how long the default crossfade is in ms */
- unsigned int m_upcomingCrossfadeMS; /* how long the upcoming crossfade is in ms */
+ unsigned int m_defaultCrossfadeMS = 0; /* how long the default crossfade is in ms */
+ unsigned int m_upcomingCrossfadeMS = 0; /* how long the upcoming crossfade is in ms */
CEvent m_startEvent; /* event for playback start */
StreamInfo* m_currentStream = nullptr;
IAudioCallback* m_audioCallback; /* the viz audio callback */
@@ -127,10 +127,10 @@ private:
CCriticalSection m_streamsLock; /* lock for the stream list */
StreamList m_streams; /* playing streams */
StreamList m_finishing; /* finishing streams */
- int m_jobCounter;
+ int m_jobCounter = 0;
CEvent m_jobEvent;
- int64_t m_newForcedPlayerTime;
- int64_t m_newForcedTotalTime;
+ int64_t m_newForcedPlayerTime = -1;
+ int64_t m_newForcedTotalTime = -1;
std::unique_ptr<CProcessInfo> m_processInfo;
bool QueueNextFileEx(const CFileItem &file, bool fadeIn);
diff --git a/xbmc/dialogs/GUIDialogColorPicker.cpp b/xbmc/dialogs/GUIDialogColorPicker.cpp
index 77cee119da..a73e47b142 100644
--- a/xbmc/dialogs/GUIDialogColorPicker.cpp
+++ b/xbmc/dialogs/GUIDialogColorPicker.cpp
@@ -29,8 +29,7 @@
CGUIDialogColorPicker::CGUIDialogColorPicker()
: CGUIDialogBoxBase(WINDOW_DIALOG_COLOR_PICKER, "DialogColorPicker.xml"),
- m_vecList(new CFileItemList()),
- m_focusToButton(false)
+ m_vecList(new CFileItemList())
{
m_bConfirmed = false;
m_loadType = KEEP_IN_MEMORY;
diff --git a/xbmc/dialogs/GUIDialogColorPicker.h b/xbmc/dialogs/GUIDialogColorPicker.h
index 1e7c65d531..fba8ebcb46 100644
--- a/xbmc/dialogs/GUIDialogColorPicker.h
+++ b/xbmc/dialogs/GUIDialogColorPicker.h
@@ -59,6 +59,6 @@ private:
CGUIViewControl m_viewControl;
CFileItemList* m_vecList;
- bool m_focusToButton;
+ bool m_focusToButton = false;
std::string m_selectedColor;
};
diff --git a/xbmc/dialogs/GUIDialogExtendedProgressBar.h b/xbmc/dialogs/GUIDialogExtendedProgressBar.h
index c6a0609420..1be7c3d78c 100644
--- a/xbmc/dialogs/GUIDialogExtendedProgressBar.h
+++ b/xbmc/dialogs/GUIDialogExtendedProgressBar.h
@@ -16,10 +16,7 @@
class CGUIDialogProgressBarHandle
{
public:
- explicit CGUIDialogProgressBarHandle(const std::string &strTitle) :
- m_fPercentage(0),
- m_strTitle(strTitle),
- m_bFinished(false) {}
+ explicit CGUIDialogProgressBarHandle(const std::string& strTitle) : m_strTitle(strTitle) {}
virtual ~CGUIDialogProgressBarHandle(void) = default;
const std::string &Title(void) { return m_strTitle; }
@@ -37,10 +34,10 @@ public:
private:
mutable CCriticalSection m_critSection;
- float m_fPercentage;
+ float m_fPercentage = 0;
std::string m_strTitle;
std::string m_strText;
- bool m_bFinished;
+ bool m_bFinished = false;
};
class CGUIDialogExtendedProgressBar : public CGUIDialog
diff --git a/xbmc/dialogs/GUIDialogNumeric.cpp b/xbmc/dialogs/GUIDialogNumeric.cpp
index 182cf6a3af..356efc401c 100644
--- a/xbmc/dialogs/GUIDialogNumeric.cpp
+++ b/xbmc/dialogs/GUIDialogNumeric.cpp
@@ -37,13 +37,7 @@ using namespace KODI::MESSAGING;
using KODI::UTILITY::CDigest;
CGUIDialogNumeric::CGUIDialogNumeric(void)
- : CGUIDialog(WINDOW_DIALOG_NUMERIC, "DialogNumeric.xml"),
- m_bConfirmed{false},
- m_bCanceled{false},
- m_mode{INPUT_PASSWORD},
- m_block{},
- m_lastblock{},
- m_dirty{false}
+ : CGUIDialog(WINDOW_DIALOG_NUMERIC, "DialogNumeric.xml"), m_block{}, m_lastblock{}
{
memset(&m_datetime, 0, sizeof(KODI::TIME::SystemTime));
m_loadType = KEEP_IN_MEMORY;
diff --git a/xbmc/dialogs/GUIDialogNumeric.h b/xbmc/dialogs/GUIDialogNumeric.h
index 2932053021..b8ad82bc6e 100644
--- a/xbmc/dialogs/GUIDialogNumeric.h
+++ b/xbmc/dialogs/GUIDialogNumeric.h
@@ -69,14 +69,14 @@ protected:
void HandleInputSeconds(uint32_t num);
void HandleInputTime(uint32_t num);
- bool m_bConfirmed;
- bool m_bCanceled;
+ bool m_bConfirmed = false;
+ bool m_bCanceled = false;
- INPUT_MODE m_mode; // the current input mode
+ INPUT_MODE m_mode = INPUT_PASSWORD; // the current input mode
KODI::TIME::SystemTime m_datetime; // for time and date modes
uint8_t m_ip[4]; // for ip address mode
uint32_t m_block; // for time, date, and IP methods.
uint32_t m_lastblock;
- bool m_dirty; // true if the current block has been changed.
+ bool m_dirty = false; // true if the current block has been changed.
std::string m_number; ///< for number or password input
};
diff --git a/xbmc/filesystem/CircularCache.cpp b/xbmc/filesystem/CircularCache.cpp
index 443736ab1c..5adeac1d36 100644
--- a/xbmc/filesystem/CircularCache.cpp
+++ b/xbmc/filesystem/CircularCache.cpp
@@ -19,15 +19,13 @@ using namespace XFILE;
using namespace std::chrono_literals;
CCircularCache::CCircularCache(size_t front, size_t back)
- : CCacheStrategy()
- , m_beg(0)
- , m_end(0)
- , m_cur(0)
- , m_buf(NULL)
- , m_size(front + back)
- , m_size_back(back)
+ : CCacheStrategy(),
+ m_buf(NULL),
+ m_size(front + back),
+ m_size_back(back)
#ifdef TARGET_WINDOWS
- , m_handle(NULL)
+ ,
+ m_handle(NULL)
#endif
{
}
diff --git a/xbmc/filesystem/CircularCache.h b/xbmc/filesystem/CircularCache.h
index 21d3e6b10b..437e73d0c5 100644
--- a/xbmc/filesystem/CircularCache.h
+++ b/xbmc/filesystem/CircularCache.h
@@ -38,9 +38,9 @@ public:
CCacheStrategy *CreateNew() override;
protected:
- int64_t m_beg; /**< index in file (not buffer) of beginning of valid data */
- int64_t m_end; /**< index in file (not buffer) of end of valid data */
- int64_t m_cur; /**< current reading index in file */
+ int64_t m_beg = 0; /**< index in file (not buffer) of beginning of valid data */
+ int64_t m_end = 0; /**< index in file (not buffer) of end of valid data */
+ int64_t m_cur = 0; /**< current reading index in file */
uint8_t *m_buf; /**< buffer holding data */
size_t m_size; /**< size of data buffer used (m_buf) */
size_t m_size_back; /**< guaranteed size of back buffer (actual size can be smaller, or larger if front buffer doesn't need it) */
diff --git a/xbmc/filesystem/Directory.cpp b/xbmc/filesystem/Directory.cpp
index 5436fd9d8a..daad2b2122 100644
--- a/xbmc/filesystem/Directory.cpp
+++ b/xbmc/filesystem/Directory.cpp
@@ -37,12 +37,12 @@ private:
struct CResult
{
- CResult(const CURL& dir, const CURL& listDir) : m_event(true), m_dir(dir), m_listDir(listDir), m_result(false) {}
+ CResult(const CURL& dir, const CURL& listDir) : m_event(true), m_dir(dir), m_listDir(listDir) {}
CEvent m_event;
CFileItemList m_list;
CURL m_dir;
CURL m_listDir;
- bool m_result;
+ bool m_result = false;
};
struct CGetJob
diff --git a/xbmc/filesystem/FileCache.cpp b/xbmc/filesystem/FileCache.cpp
index b62d8b3911..26b5c978c2 100644
--- a/xbmc/filesystem/FileCache.cpp
+++ b/xbmc/filesystem/FileCache.cpp
@@ -78,22 +78,8 @@ private:
int64_t m_size;
};
-
CFileCache::CFileCache(const unsigned int flags)
- : CThread("FileCache"),
- m_seekPossible(0),
- m_nSeekResult(0),
- m_seekPos(0),
- m_readPos(0),
- m_writePos(0),
- m_chunkSize(0),
- m_writeRate(0),
- m_writeRateActual(0),
- m_writeRateLowSpeed(0),
- m_forwardCacheSize(0),
- m_bFilling(false),
- m_fileSize(0),
- m_flags(flags)
+ : CThread("FileCache"), m_fileSize(0), m_flags(flags)
{
}
diff --git a/xbmc/filesystem/FileCache.h b/xbmc/filesystem/FileCache.h
index df7c8396c9..920e747df4 100644
--- a/xbmc/filesystem/FileCache.h
+++ b/xbmc/filesystem/FileCache.h
@@ -56,21 +56,21 @@ namespace XFILE
private:
std::unique_ptr<CCacheStrategy> m_pCache;
- int m_seekPossible;
+ int m_seekPossible = 0;
CFile m_source;
std::string m_sourcePath;
CEvent m_seekEvent;
CEvent m_seekEnded;
- int64_t m_nSeekResult;
- int64_t m_seekPos;
- int64_t m_readPos;
- int64_t m_writePos;
- unsigned m_chunkSize;
- uint32_t m_writeRate;
- uint32_t m_writeRateActual;
- uint32_t m_writeRateLowSpeed;
- int64_t m_forwardCacheSize;
- bool m_bFilling;
+ int64_t m_nSeekResult = 0;
+ int64_t m_seekPos = 0;
+ int64_t m_readPos = 0;
+ int64_t m_writePos = 0;
+ unsigned m_chunkSize = 0;
+ uint32_t m_writeRate = 0;
+ uint32_t m_writeRateActual = 0;
+ uint32_t m_writeRateLowSpeed = 0;
+ int64_t m_forwardCacheSize = 0;
+ bool m_bFilling = false;
std::atomic<int64_t> m_fileSize;
unsigned int m_flags;
CCriticalSection m_sync;
diff --git a/xbmc/filesystem/NptXbmcFile.cpp b/xbmc/filesystem/NptXbmcFile.cpp
index 04f3bae709..90252ba0b4 100644
--- a/xbmc/filesystem/NptXbmcFile.cpp
+++ b/xbmc/filesystem/NptXbmcFile.cpp
@@ -243,16 +243,14 @@ public:
private:
// members
NPT_File& m_Delegator;
- OpenMode m_Mode;
+ OpenMode m_Mode = 0;
NPT_XbmcFileReference m_FileReference;
};
/*----------------------------------------------------------------------
| NPT_XbmcFile::NPT_XbmcFile
+---------------------------------------------------------------------*/
-NPT_XbmcFile::NPT_XbmcFile(NPT_File& delegator) :
- m_Delegator(delegator),
- m_Mode(0)
+NPT_XbmcFile::NPT_XbmcFile(NPT_File& delegator) : m_Delegator(delegator)
{
}
diff --git a/xbmc/games/addons/GameClient.cpp b/xbmc/games/addons/GameClient.cpp
index b3e7e018f7..518b280b31 100644
--- a/xbmc/games/addons/GameClient.cpp
+++ b/xbmc/games/addons/GameClient.cpp
@@ -83,10 +83,7 @@ std::string NormalizeExtension(const std::string& strExtension)
CGameClient::CGameClient(const ADDON::AddonInfoPtr& addonInfo)
: CAddonDll(addonInfo, ADDON::AddonType::GAMEDLL),
m_subsystems(CGameClientSubsystem::CreateSubsystems(*this, *m_ifc.game, m_critSection)),
- m_bSupportsAllExtensions(false),
- m_bIsPlaying(false),
- m_serializeSize(0),
- m_region(GAME_REGION_UNKNOWN)
+ m_bIsPlaying(false)
{
using namespace ADDON;
diff --git a/xbmc/games/addons/GameClient.h b/xbmc/games/addons/GameClient.h
index 12a0b618c2..212039c8e9 100644
--- a/xbmc/games/addons/GameClient.h
+++ b/xbmc/games/addons/GameClient.h
@@ -240,7 +240,7 @@ private:
bool m_bSupportsVFS;
bool m_bSupportsStandalone;
std::set<std::string> m_extensions;
- bool m_bSupportsAllExtensions;
+ bool m_bSupportsAllExtensions = false;
std::string m_emulatorName;
std::string m_platforms;
@@ -248,11 +248,11 @@ private:
std::atomic_bool m_bIsPlaying; // True between OpenFile() and CloseFile()
std::string m_gamePath;
bool m_bRequiresGameLoop = false;
- size_t m_serializeSize;
+ size_t m_serializeSize = 0;
IGameInputCallback* m_input = nullptr; // The input callback passed to OpenFile()
double m_framerate = 0.0; // Video frame rate (fps)
double m_samplerate = 0.0; // Audio sample rate (Hz)
- GAME_REGION m_region; // Region of the loaded game
+ GAME_REGION m_region = GAME_REGION_UNKNOWN; // Region of the loaded game
// In-game saves
std::unique_ptr<CGameClientInGameSaves> m_inGameSaves;
diff --git a/xbmc/games/controllers/windows/GUIControllerList.cpp b/xbmc/games/controllers/windows/GUIControllerList.cpp
index 415ecb1c42..2a5802b93b 100644
--- a/xbmc/games/controllers/windows/GUIControllerList.cpp
+++ b/xbmc/games/controllers/windows/GUIControllerList.cpp
@@ -45,9 +45,6 @@ CGUIControllerList::CGUIControllerList(CGUIWindow* window,
std::string controllerId)
: m_guiWindow(window),
m_featureList(featureList),
- m_controllerList(nullptr),
- m_controllerButton(nullptr),
- m_focusedController(-1), // Initially unfocused
m_gameClient(std::move(gameClient)),
m_controllerId(std::move(controllerId))
{
diff --git a/xbmc/games/controllers/windows/GUIControllerList.h b/xbmc/games/controllers/windows/GUIControllerList.h
index 0c8fe33483..68c3485ec4 100644
--- a/xbmc/games/controllers/windows/GUIControllerList.h
+++ b/xbmc/games/controllers/windows/GUIControllerList.h
@@ -63,12 +63,12 @@ private:
// GUI stuff
CGUIWindow* const m_guiWindow;
IFeatureList* const m_featureList;
- CGUIControlGroupList* m_controllerList;
- CGUIButtonControl* m_controllerButton;
+ CGUIControlGroupList* m_controllerList = nullptr;
+ CGUIButtonControl* m_controllerButton = nullptr;
// Game stuff
ControllerVector m_controllers;
- int m_focusedController;
+ int m_focusedController = -1; // Initially unfocused
GameClientPtr m_gameClient;
std::string m_controllerId;
};
diff --git a/xbmc/games/controllers/windows/GUIFeatureList.cpp b/xbmc/games/controllers/windows/GUIFeatureList.cpp
index d43c16d1ee..1582e640d0 100644
--- a/xbmc/games/controllers/windows/GUIFeatureList.cpp
+++ b/xbmc/games/controllers/windows/GUIFeatureList.cpp
@@ -29,13 +29,7 @@ using namespace KODI;
using namespace GAME;
CGUIFeatureList::CGUIFeatureList(CGUIWindow* window, GameClientPtr gameClient)
- : m_window(window),
- m_guiList(nullptr),
- m_guiButtonTemplate(nullptr),
- m_guiGroupTitle(nullptr),
- m_guiFeatureSeparator(nullptr),
- m_gameClient(std::move(gameClient)),
- m_wizard(new CGUIConfigurationWizard)
+ : m_window(window), m_gameClient(std::move(gameClient)), m_wizard(new CGUIConfigurationWizard)
{
}
diff --git a/xbmc/games/controllers/windows/GUIFeatureList.h b/xbmc/games/controllers/windows/GUIFeatureList.h
index c7df54f09f..087709a669 100644
--- a/xbmc/games/controllers/windows/GUIFeatureList.h
+++ b/xbmc/games/controllers/windows/GUIFeatureList.h
@@ -63,10 +63,10 @@ private:
// GUI stuff
CGUIWindow* const m_window;
unsigned int m_buttonCount = 0;
- CGUIControlGroupList* m_guiList;
- CGUIButtonControl* m_guiButtonTemplate;
- CGUILabelControl* m_guiGroupTitle;
- CGUIImage* m_guiFeatureSeparator;
+ CGUIControlGroupList* m_guiList = nullptr;
+ CGUIButtonControl* m_guiButtonTemplate = nullptr;
+ CGUILabelControl* m_guiGroupTitle = nullptr;
+ CGUIImage* m_guiFeatureSeparator = nullptr;
// Game window stuff
GameClientPtr m_gameClient;
diff --git a/xbmc/guilib/GUIControlProfiler.cpp b/xbmc/guilib/GUIControlProfiler.cpp
index a3605a2033..d9a6570d15 100644
--- a/xbmc/guilib/GUIControlProfiler.cpp
+++ b/xbmc/guilib/GUIControlProfiler.cpp
@@ -14,8 +14,10 @@
bool CGUIControlProfiler::m_bIsRunning = false;
-CGUIControlProfilerItem::CGUIControlProfilerItem(CGUIControlProfiler *pProfiler, CGUIControlProfilerItem *pParent, CGUIControl *pControl)
-: m_pProfiler(pProfiler), m_pParent(pParent), m_pControl(pControl), m_visTime(0), m_renderTime(0), m_i64VisStart(0), m_i64RenderStart(0)
+CGUIControlProfilerItem::CGUIControlProfilerItem(CGUIControlProfiler* pProfiler,
+ CGUIControlProfilerItem* pParent,
+ CGUIControl* pControl)
+ : m_pProfiler(pProfiler), m_pParent(pParent), m_pControl(pControl)
{
if (m_pControl)
{
diff --git a/xbmc/guilib/GUIControlProfiler.h b/xbmc/guilib/GUIControlProfiler.h
index 006493a75a..6dea9fc69b 100644
--- a/xbmc/guilib/GUIControlProfiler.h
+++ b/xbmc/guilib/GUIControlProfiler.h
@@ -25,10 +25,10 @@ public:
std::string m_strDescription;
int m_controlID;
CGUIControl::GUICONTROLTYPES m_ControlType;
- unsigned int m_visTime;
- unsigned int m_renderTime;
- int64_t m_i64VisStart;
- int64_t m_i64RenderStart;
+ unsigned int m_visTime = 0;
+ unsigned int m_renderTime = 0;
+ int64_t m_i64VisStart = 0;
+ int64_t m_i64RenderStart = 0;
CGUIControlProfilerItem(CGUIControlProfiler *pProfiler, CGUIControlProfilerItem *pParent, CGUIControl *pControl);
~CGUIControlProfilerItem(void);
diff --git a/xbmc/guilib/GUIIncludes.cpp b/xbmc/guilib/GUIIncludes.cpp
index d950c2d3b7..55d967346f 100644
--- a/xbmc/guilib/GUIIncludes.cpp
+++ b/xbmc/guilib/GUIIncludes.cpp
@@ -640,11 +640,11 @@ class ParamReplacer
{
const std::map<std::string, std::string>& m_params;
// keep some stats so that we know exactly what's been resolved
- int m_numTotalParams;
- int m_numUndefinedParams;
+ int m_numTotalParams = 0;
+ int m_numUndefinedParams = 0;
+
public:
- explicit ParamReplacer(const std::map<std::string, std::string>& params)
- : m_params(params), m_numTotalParams(0), m_numUndefinedParams(0) {}
+ explicit ParamReplacer(const std::map<std::string, std::string>& params) : m_params(params) {}
int GetNumTotalParams() const { return m_numTotalParams; }
int GetNumDefinedParams() const { return m_numTotalParams - m_numUndefinedParams; }
int GetNumUndefinedParams() const { return m_numUndefinedParams; }
diff --git a/xbmc/guilib/GUILabel.cpp b/xbmc/guilib/GUILabel.cpp
index c4c2c92035..471e0c761a 100644
--- a/xbmc/guilib/GUILabel.cpp
+++ b/xbmc/guilib/GUILabel.cpp
@@ -10,16 +10,19 @@
#include <limits>
-CGUILabel::CGUILabel(float posX, float posY, float width, float height, const CLabelInfo& labelInfo, CGUILabel::OVER_FLOW overflow)
- : m_label(labelInfo)
- , m_textLayout(labelInfo.font, overflow == OVER_FLOW_WRAP, height)
- , m_scrolling(overflow == OVER_FLOW_SCROLL)
- , m_overflowType(overflow)
- , m_scrollInfo(50, 0, labelInfo.scrollSpeed, labelInfo.scrollSuffix)
- , m_renderRect()
- , m_maxRect(posX, posY, posX + width, posY + height)
- , m_invalid(true)
- , m_color(COLOR_TEXT)
+CGUILabel::CGUILabel(float posX,
+ float posY,
+ float width,
+ float height,
+ const CLabelInfo& labelInfo,
+ CGUILabel::OVER_FLOW overflow)
+ : m_label(labelInfo),
+ m_textLayout(labelInfo.font, overflow == OVER_FLOW_WRAP, height),
+ m_scrolling(overflow == OVER_FLOW_SCROLL),
+ m_overflowType(overflow),
+ m_scrollInfo(50, 0, labelInfo.scrollSpeed, labelInfo.scrollSuffix),
+ m_renderRect(),
+ m_maxRect(posX, posY, posX + width, posY + height)
{
}
diff --git a/xbmc/guilib/GUILabel.h b/xbmc/guilib/GUILabel.h
index 734466735b..dbfa499d89 100644
--- a/xbmc/guilib/GUILabel.h
+++ b/xbmc/guilib/GUILabel.h
@@ -234,7 +234,7 @@ private:
CScrollInfo m_scrollInfo;
CRect m_renderRect; ///< actual sizing of text
CRect m_maxRect; ///< maximum sizing of text
- bool m_invalid; ///< if true, the label needs recomputing
- COLOR m_color; ///< color to render text \sa SetColor, GetColor
+ bool m_invalid = true; ///< if true, the label needs recomputing
+ COLOR m_color = COLOR_TEXT; ///< color to render text \sa SetColor, GetColor
unsigned int m_maxScrollLoops = ~0U;
};
diff --git a/xbmc/guilib/GUIRSSControl.cpp b/xbmc/guilib/GUIRSSControl.cpp
index f35441e2ed..8d511d6976 100644
--- a/xbmc/guilib/GUIRSSControl.cpp
+++ b/xbmc/guilib/GUIRSSControl.cpp
@@ -20,16 +20,22 @@
using namespace KODI::GUILIB;
-CGUIRSSControl::CGUIRSSControl(int parentID, int controlID, float posX, float posY, float width, float height,
- const CLabelInfo& labelInfo, const GUIINFO::CGUIInfoColor &channelColor,
- const GUIINFO::CGUIInfoColor &headlineColor, std::string& strRSSTags)
-: CGUIControl(parentID, controlID, posX, posY, width, height),
- m_strRSSTags(strRSSTags),
- m_label(labelInfo),
- m_channelColor(channelColor),
- m_headlineColor(headlineColor),
- m_scrollInfo(0,0,labelInfo.scrollSpeed,""),
- m_dirty(true)
+CGUIRSSControl::CGUIRSSControl(int parentID,
+ int controlID,
+ float posX,
+ float posY,
+ float width,
+ float height,
+ const CLabelInfo& labelInfo,
+ const GUIINFO::CGUIInfoColor& channelColor,
+ const GUIINFO::CGUIInfoColor& headlineColor,
+ std::string& strRSSTags)
+ : CGUIControl(parentID, controlID, posX, posY, width, height),
+ m_strRSSTags(strRSSTags),
+ m_label(labelInfo),
+ m_channelColor(channelColor),
+ m_headlineColor(headlineColor),
+ m_scrollInfo(0, 0, labelInfo.scrollSpeed, "")
{
m_pReader = NULL;
m_rtl = false;
@@ -38,17 +44,16 @@ CGUIRSSControl::CGUIRSSControl(int parentID, int controlID, float posX, float po
ControlType = GUICONTROL_RSS;
}
-CGUIRSSControl::CGUIRSSControl(const CGUIRSSControl &from)
+CGUIRSSControl::CGUIRSSControl(const CGUIRSSControl& from)
: CGUIControl(from),
- m_feed(),
- m_strRSSTags(from.m_strRSSTags),
- m_label(from.m_label),
- m_channelColor(from.m_channelColor),
- m_headlineColor(from.m_headlineColor),
- m_vecUrls(),
- m_vecIntervals(),
- m_scrollInfo(from.m_scrollInfo),
- m_dirty(true)
+ m_feed(),
+ m_strRSSTags(from.m_strRSSTags),
+ m_label(from.m_label),
+ m_channelColor(from.m_channelColor),
+ m_headlineColor(from.m_headlineColor),
+ m_vecUrls(),
+ m_vecIntervals(),
+ m_scrollInfo(from.m_scrollInfo)
{
m_pReader = NULL;
m_rtl = from.m_rtl;
diff --git a/xbmc/guilib/GUIRSSControl.h b/xbmc/guilib/GUIRSSControl.h
index 851f72fb3c..af9448c0a2 100644
--- a/xbmc/guilib/GUIRSSControl.h
+++ b/xbmc/guilib/GUIRSSControl.h
@@ -65,7 +65,7 @@ protected:
std::vector<int> m_vecIntervals;
bool m_rtl;
CScrollInfo m_scrollInfo;
- bool m_dirty;
+ bool m_dirty = true;
bool m_stopped;
int m_urlset;
};
diff --git a/xbmc/guilib/IGUIContainer.h b/xbmc/guilib/IGUIContainer.h
index 93b404ffb7..b968b32cfb 100644
--- a/xbmc/guilib/IGUIContainer.h
+++ b/xbmc/guilib/IGUIContainer.h
@@ -22,11 +22,13 @@ typedef std::shared_ptr<CGUIListItem> CGUIListItemPtr;
class IGUIContainer : public CGUIControl
{
protected:
- VIEW_TYPE m_type;
+ VIEW_TYPE m_type = VIEW_TYPE_NONE;
std::string m_label;
public:
IGUIContainer(int parentID, int controlID, float posX, float posY, float width, float height)
- : CGUIControl(parentID, controlID, posX, posY, width, height), m_type(VIEW_TYPE_NONE) {}
+ : CGUIControl(parentID, controlID, posX, posY, width, height)
+ {
+ }
bool IsContainer() const override { return true; }
diff --git a/xbmc/input/joysticks/JoystickEasterEgg.cpp b/xbmc/input/joysticks/JoystickEasterEgg.cpp
index 0c63e66470..251908ffd8 100644
--- a/xbmc/input/joysticks/JoystickEasterEgg.cpp
+++ b/xbmc/input/joysticks/JoystickEasterEgg.cpp
@@ -52,7 +52,7 @@ const std::map<std::string, std::vector<FeatureName>> CJoystickEasterEgg::m_sequ
};
CJoystickEasterEgg::CJoystickEasterEgg(const std::string& controllerId)
- : m_controllerId(controllerId), m_state(0)
+ : m_controllerId(controllerId)
{
}
diff --git a/xbmc/input/joysticks/JoystickEasterEgg.h b/xbmc/input/joysticks/JoystickEasterEgg.h
index 7059d13535..4f5b61f6ae 100644
--- a/xbmc/input/joysticks/JoystickEasterEgg.h
+++ b/xbmc/input/joysticks/JoystickEasterEgg.h
@@ -39,7 +39,7 @@ private:
static const std::map<std::string, std::vector<FeatureName>> m_sequence;
- unsigned int m_state;
+ unsigned int m_state = 0;
};
} // namespace JOYSTICK
} // namespace KODI
diff --git a/xbmc/input/joysticks/generic/ButtonMapping.cpp b/xbmc/input/joysticks/generic/ButtonMapping.cpp
index af6bf8692f..8ecfb83c23 100644
--- a/xbmc/input/joysticks/generic/ButtonMapping.cpp
+++ b/xbmc/input/joysticks/generic/ButtonMapping.cpp
@@ -81,14 +81,7 @@ bool CHatDetector::OnMotion(HAT_STATE state)
CAxisDetector::CAxisDetector(CButtonMapping* buttonMapping,
unsigned int axisIndex,
const AxisConfiguration& config)
- : CPrimitiveDetector(buttonMapping),
- m_axisIndex(axisIndex),
- m_config(config),
- m_state(AXIS_STATE::INACTIVE),
- m_type(AXIS_TYPE::UNKNOWN),
- m_initialPositionKnown(false),
- m_initialPosition(0.0f),
- m_initialPositionChanged(false)
+ : CPrimitiveDetector(buttonMapping), m_axisIndex(axisIndex), m_config(config)
{
}
@@ -319,7 +312,7 @@ KODI::INPUT::INTERCARDINAL_DIRECTION CPointerDetector::GetPointerDirection(int x
// --- CButtonMapping ----------------------------------------------------------
CButtonMapping::CButtonMapping(IButtonMapper* buttonMapper, IButtonMap* buttonMap, IKeymap* keymap)
- : m_buttonMapper(buttonMapper), m_buttonMap(buttonMap), m_keymap(keymap), m_frameCount(0)
+ : m_buttonMapper(buttonMapper), m_buttonMap(buttonMap), m_keymap(keymap)
{
assert(m_buttonMapper != nullptr);
assert(m_buttonMap != nullptr);
diff --git a/xbmc/input/joysticks/generic/ButtonMapping.h b/xbmc/input/joysticks/generic/ButtonMapping.h
index 3f76767d06..3b7813b3af 100644
--- a/xbmc/input/joysticks/generic/ButtonMapping.h
+++ b/xbmc/input/joysticks/generic/ButtonMapping.h
@@ -210,12 +210,13 @@ private:
AxisConfiguration m_config; // mutable
// State variables
- AXIS_STATE m_state;
+ AXIS_STATE m_state = AXIS_STATE::INACTIVE;
CDriverPrimitive m_activatedPrimitive;
- AXIS_TYPE m_type;
- bool m_initialPositionKnown; // set to true on first motion
- float m_initialPosition; // set to position of first motion
- bool m_initialPositionChanged; // set to true when position differs from the initial position
+ AXIS_TYPE m_type = AXIS_TYPE::UNKNOWN;
+ bool m_initialPositionKnown = false; // set to true on first motion
+ float m_initialPosition = 0.0f; // set to position of first motion
+ bool m_initialPositionChanged =
+ false; // set to true when position differs from the initial position
std::chrono::time_point<std::chrono::steady_clock>
m_activationTimeMs; // only used to delay anomalous trigger mapping to detect full range
};
@@ -387,7 +388,7 @@ private:
std::map<MOUSE::BUTTON_ID, CMouseButtonDetector> m_mouseButtons;
std::unique_ptr<CPointerDetector> m_pointer;
std::chrono::time_point<std::chrono::steady_clock> m_lastAction;
- uint64_t m_frameCount;
+ uint64_t m_frameCount = 0;
};
} // namespace JOYSTICK
} // namespace KODI
diff --git a/xbmc/input/joysticks/generic/FeatureHandling.cpp b/xbmc/input/joysticks/generic/FeatureHandling.cpp
index 639ae5b5bd..e523b4b2c2 100644
--- a/xbmc/input/joysticks/generic/FeatureHandling.cpp
+++ b/xbmc/input/joysticks/generic/FeatureHandling.cpp
@@ -81,11 +81,7 @@ unsigned int CJoystickFeature::MotionTimeMs() const
CScalarFeature::CScalarFeature(const FeatureName& name,
IInputHandler* handler,
IButtonMap* buttonMap)
- : CJoystickFeature(name, handler, buttonMap),
- m_bDigitalState(false),
- m_analogState(0.0f),
- m_bActivated(false),
- m_bDiscrete(true)
+ : CJoystickFeature(name, handler, buttonMap)
{
GAME::ControllerPtr controller =
CServiceBroker::GetGameControllerManager().GetController(handler->ControllerID());
@@ -226,7 +222,7 @@ void CScalarFeature::ProcessAnalogMotion()
// --- CAxisFeature ------------------------------------------------------------
CAxisFeature::CAxisFeature(const FeatureName& name, IInputHandler* handler, IButtonMap* buttonMap)
- : CJoystickFeature(name, handler, buttonMap), m_state(0.0f)
+ : CJoystickFeature(name, handler, buttonMap)
{
}
@@ -379,7 +375,7 @@ bool CThrottle::OnAnalogMotion(const CDriverPrimitive& source, float magnitude)
// --- CAnalogStick ------------------------------------------------------------
CAnalogStick::CAnalogStick(const FeatureName& name, IInputHandler* handler, IButtonMap* buttonMap)
- : CJoystickFeature(name, handler, buttonMap), m_vertState(0.0f), m_horizState(0.0f)
+ : CJoystickFeature(name, handler, buttonMap)
{
}
@@ -482,10 +478,7 @@ void CAnalogStick::ProcessMotions(void)
CAccelerometer::CAccelerometer(const FeatureName& name,
IInputHandler* handler,
IButtonMap* buttonMap)
- : CJoystickFeature(name, handler, buttonMap),
- m_xAxisState(0.0f),
- m_yAxisState(0.0f),
- m_zAxisState(0.0f)
+ : CJoystickFeature(name, handler, buttonMap)
{
}
diff --git a/xbmc/input/joysticks/generic/FeatureHandling.h b/xbmc/input/joysticks/generic/FeatureHandling.h
index 1a42d5c8d3..651fdeebaf 100644
--- a/xbmc/input/joysticks/generic/FeatureHandling.h
+++ b/xbmc/input/joysticks/generic/FeatureHandling.h
@@ -129,13 +129,13 @@ private:
// State variables
INPUT_TYPE m_inputType = INPUT_TYPE::UNKNOWN;
- bool m_bDigitalState;
+ bool m_bDigitalState = false;
bool m_bInitialPressHandled = false;
// Analog state variables
- float m_analogState; // The current magnitude
- float m_bActivated; // Set to true when first activated (magnitude > 0.0)
- bool m_bDiscrete; // Set to false when a non-discrete axis is detected
+ float m_analogState = 0.0f; // The current magnitude
+ float m_bActivated = false; // Set to true when first activated (magnitude > 0.0)
+ bool m_bDiscrete = true; // Set to false when a non-discrete axis is detected
};
/*!
@@ -216,7 +216,7 @@ public:
protected:
CFeatureAxis m_axis;
- float m_state;
+ float m_state = 0.0f;
};
class CWheel : public CAxisFeature
@@ -254,8 +254,8 @@ protected:
CFeatureAxis m_vertAxis;
CFeatureAxis m_horizAxis;
- float m_vertState;
- float m_horizState;
+ float m_vertState = 0.0f;
+ float m_horizState = 0.0f;
};
class CAccelerometer : public CJoystickFeature
@@ -274,9 +274,9 @@ protected:
CFeatureAxis m_yAxis;
CFeatureAxis m_zAxis;
- float m_xAxisState;
- float m_yAxisState;
- float m_zAxisState;
+ float m_xAxisState = 0.0f;
+ float m_yAxisState = 0.0f;
+ float m_zAxisState = 0.0f;
};
} // namespace JOYSTICK
} // namespace KODI
diff --git a/xbmc/input/touch/generic/GenericTouchRotateDetector.cpp b/xbmc/input/touch/generic/GenericTouchRotateDetector.cpp
index 79db638e2c..198d67bda7 100644
--- a/xbmc/input/touch/generic/GenericTouchRotateDetector.cpp
+++ b/xbmc/input/touch/generic/GenericTouchRotateDetector.cpp
@@ -15,7 +15,7 @@
#endif
CGenericTouchRotateDetector::CGenericTouchRotateDetector(ITouchActionHandler* handler, float dpi)
- : IGenericTouchGestureDetector(handler, dpi), m_angle(0.0f)
+ : IGenericTouchGestureDetector(handler, dpi)
{
}
diff --git a/xbmc/input/touch/generic/GenericTouchRotateDetector.h b/xbmc/input/touch/generic/GenericTouchRotateDetector.h
index 695879ae66..db40b3e628 100644
--- a/xbmc/input/touch/generic/GenericTouchRotateDetector.h
+++ b/xbmc/input/touch/generic/GenericTouchRotateDetector.h
@@ -32,5 +32,5 @@ private:
/*!
* \brief Angle of the detected rotation
*/
- float m_angle;
+ float m_angle = 0.0f;
};
diff --git a/xbmc/input/touch/generic/GenericTouchSwipeDetector.cpp b/xbmc/input/touch/generic/GenericTouchSwipeDetector.cpp
index 7d772b5927..e9afa2426d 100644
--- a/xbmc/input/touch/generic/GenericTouchSwipeDetector.cpp
+++ b/xbmc/input/touch/generic/GenericTouchSwipeDetector.cpp
@@ -28,9 +28,7 @@
CGenericTouchSwipeDetector::CGenericTouchSwipeDetector(ITouchActionHandler* handler, float dpi)
: IGenericTouchGestureDetector(handler, dpi),
m_directions(TouchMoveDirectionLeft | TouchMoveDirectionRight | TouchMoveDirectionUp |
- TouchMoveDirectionDown),
- m_swipeDetected(false),
- m_size(0)
+ TouchMoveDirectionDown)
{
}
diff --git a/xbmc/input/touch/generic/GenericTouchSwipeDetector.h b/xbmc/input/touch/generic/GenericTouchSwipeDetector.h
index 7fe88b1f3a..582ef9094b 100644
--- a/xbmc/input/touch/generic/GenericTouchSwipeDetector.h
+++ b/xbmc/input/touch/generic/GenericTouchSwipeDetector.h
@@ -41,9 +41,9 @@ private:
/*!
* \brief Whether a swipe gesture has been detected or not
*/
- bool m_swipeDetected;
+ bool m_swipeDetected = false;
/*!
* \brief Number of active pointers
*/
- unsigned int m_size;
+ unsigned int m_size = 0;
};
diff --git a/xbmc/input/touch/generic/IGenericTouchGestureDetector.h b/xbmc/input/touch/generic/IGenericTouchGestureDetector.h
index 7e2cb88365..26ae5883d1 100644
--- a/xbmc/input/touch/generic/IGenericTouchGestureDetector.h
+++ b/xbmc/input/touch/generic/IGenericTouchGestureDetector.h
@@ -20,7 +20,7 @@
class IGenericTouchGestureDetector : public ITouchInputHandling
{
public:
- IGenericTouchGestureDetector(ITouchActionHandler* handler, float dpi) : m_done(false), m_dpi(dpi)
+ IGenericTouchGestureDetector(ITouchActionHandler* handler, float dpi) : m_dpi(dpi)
{
RegisterHandler(handler);
}
@@ -79,7 +79,7 @@ protected:
/*!
* \brief Whether the gesture recognition is finished or not
*/
- bool m_done;
+ bool m_done = false;
/*!
* \brief DPI value of the touch screen
*/
diff --git a/xbmc/interfaces/generic/ILanguageInvoker.cpp b/xbmc/interfaces/generic/ILanguageInvoker.cpp
index df1193ed25..89e281ff2d 100644
--- a/xbmc/interfaces/generic/ILanguageInvoker.cpp
+++ b/xbmc/interfaces/generic/ILanguageInvoker.cpp
@@ -13,10 +13,8 @@
#include <string>
#include <vector>
-ILanguageInvoker::ILanguageInvoker(ILanguageInvocationHandler *invocationHandler)
- : m_id(-1),
- m_state(InvokerStateUninitialized),
- m_invocationHandler(invocationHandler)
+ILanguageInvoker::ILanguageInvoker(ILanguageInvocationHandler* invocationHandler)
+ : m_invocationHandler(invocationHandler)
{ }
ILanguageInvoker::~ILanguageInvoker() = default;
diff --git a/xbmc/interfaces/generic/ILanguageInvoker.h b/xbmc/interfaces/generic/ILanguageInvoker.h
index da4001e150..19374bff03 100644
--- a/xbmc/interfaces/generic/ILanguageInvoker.h
+++ b/xbmc/interfaces/generic/ILanguageInvoker.h
@@ -69,8 +69,8 @@ protected:
ADDON::AddonPtr m_addon;
private:
- int m_id;
- InvokerState m_state;
+ int m_id = -1;
+ InvokerState m_state = InvokerStateUninitialized;
ILanguageInvocationHandler *m_invocationHandler;
};
diff --git a/xbmc/interfaces/info/InfoBool.cpp b/xbmc/interfaces/info/InfoBool.cpp
index 65b1f44ec2..5545811c3e 100644
--- a/xbmc/interfaces/info/InfoBool.cpp
+++ b/xbmc/interfaces/info/InfoBool.cpp
@@ -12,14 +12,9 @@
namespace INFO
{
- InfoBool::InfoBool(const std::string &expression, int context, unsigned int &refreshCounter)
- : m_value(false),
- m_context(context),
- m_listItemDependent(false),
- m_expression(expression),
- m_refreshCounter(0),
- m_parentRefreshCounter(refreshCounter)
- {
- StringUtils::ToLower(m_expression);
- }
+InfoBool::InfoBool(const std::string& expression, int context, unsigned int& refreshCounter)
+ : m_context(context), m_expression(expression), m_parentRefreshCounter(refreshCounter)
+{
+ StringUtils::ToLower(m_expression);
+}
}
diff --git a/xbmc/interfaces/info/InfoBool.h b/xbmc/interfaces/info/InfoBool.h
index 6906276b7b..9a22269416 100644
--- a/xbmc/interfaces/info/InfoBool.h
+++ b/xbmc/interfaces/info/InfoBool.h
@@ -68,14 +68,13 @@ public:
const std::string &GetExpression() const { return m_expression; }
bool ListItemDependent() const { return m_listItemDependent; }
protected:
-
- bool m_value; ///< current value
+ bool m_value = false; ///< current value
int m_context; ///< contextual information to go with the condition
- bool m_listItemDependent; ///< do not cache if a listitem pointer is given
+ bool m_listItemDependent = false; ///< do not cache if a listitem pointer is given
std::string m_expression; ///< original expression
private:
- unsigned int m_refreshCounter;
+ unsigned int m_refreshCounter = 0;
unsigned int &m_parentRefreshCounter;
};
diff --git a/xbmc/interfaces/python/PythonInvoker.cpp b/xbmc/interfaces/python/PythonInvoker.cpp
index 0f77ce5273..011d4bd9f3 100644
--- a/xbmc/interfaces/python/PythonInvoker.cpp
+++ b/xbmc/interfaces/python/PythonInvoker.cpp
@@ -84,7 +84,7 @@ static const std::string getListOfAddonClassesAsString(
}
CPythonInvoker::CPythonInvoker(ILanguageInvocationHandler* invocationHandler)
- : ILanguageInvoker(invocationHandler), m_threadState(NULL), m_stop(false)
+ : ILanguageInvoker(invocationHandler), m_threadState(NULL)
{
}
diff --git a/xbmc/interfaces/python/PythonInvoker.h b/xbmc/interfaces/python/PythonInvoker.h
index e4ad95e8b4..052cc31677 100644
--- a/xbmc/interfaces/python/PythonInvoker.h
+++ b/xbmc/interfaces/python/PythonInvoker.h
@@ -61,7 +61,7 @@ private:
FILE* PyFile_AsFileWithMode(PyObject* py_file, const char* mode);
PyThreadState* m_threadState;
- bool m_stop;
+ bool m_stop = false;
CEvent m_stoppedEvent;
XBMCAddon::AddonClass::Ref<XBMCAddon::Python::PythonLanguageHook> m_languageHook;
diff --git a/xbmc/listproviders/DirectoryProvider.cpp b/xbmc/listproviders/DirectoryProvider.cpp
index f334f88458..b71c740da9 100644
--- a/xbmc/listproviders/DirectoryProvider.cpp
+++ b/xbmc/listproviders/DirectoryProvider.cpp
@@ -154,11 +154,8 @@ private:
std::map<InfoTagType, std::shared_ptr<CThumbLoader> > m_thumbloaders;
};
-CDirectoryProvider::CDirectoryProvider(const TiXmlElement *element, int parentID)
- : IListProvider(parentID),
- m_updateState(OK),
- m_jobID(0),
- m_currentLimit(0)
+CDirectoryProvider::CDirectoryProvider(const TiXmlElement* element, int parentID)
+ : IListProvider(parentID)
{
assert(element);
if (!element->NoChildren())
@@ -186,7 +183,6 @@ CDirectoryProvider::CDirectoryProvider(const TiXmlElement *element, int parentID
CDirectoryProvider::CDirectoryProvider(const CDirectoryProvider& other)
: IListProvider(other.m_parentID),
m_updateState(INVALIDATED),
- m_jobID(0),
m_url(other.m_url),
m_target(other.m_target),
m_sortMethod(other.m_sortMethod),
diff --git a/xbmc/listproviders/DirectoryProvider.h b/xbmc/listproviders/DirectoryProvider.h
index 8e39dc7bec..c32a0f189e 100644
--- a/xbmc/listproviders/DirectoryProvider.h
+++ b/xbmc/listproviders/DirectoryProvider.h
@@ -73,8 +73,8 @@ public:
// callback from directory job
void OnJobComplete(unsigned int jobID, bool success, CJob *job) override;
private:
- UpdateState m_updateState;
- unsigned int m_jobID;
+ UpdateState m_updateState = OK;
+ unsigned int m_jobID = 0;
KODI::GUILIB::GUIINFO::CGUIInfoLabel m_url;
KODI::GUILIB::GUIINFO::CGUIInfoLabel m_target;
KODI::GUILIB::GUIINFO::CGUIInfoLabel m_sortMethod;
@@ -83,7 +83,7 @@ private:
std::string m_currentUrl;
std::string m_currentTarget; ///< \brief node.target property on the list as a whole
SortDescription m_currentSort;
- unsigned int m_currentLimit;
+ unsigned int m_currentLimit = 0;
std::vector<CGUIStaticItemPtr> m_items;
std::vector<InfoTagType> m_itemTypes;
mutable CCriticalSection m_section;
diff --git a/xbmc/music/MusicInfoLoader.cpp b/xbmc/music/MusicInfoLoader.cpp
index 2732bd4d3f..7cfa0352ff 100644
--- a/xbmc/music/MusicInfoLoader.cpp
+++ b/xbmc/music/MusicInfoLoader.cpp
@@ -30,10 +30,7 @@ using namespace XFILE;
using namespace MUSIC_INFO;
// HACK until we make this threadable - specify 1 thread only for now
-CMusicInfoLoader::CMusicInfoLoader()
- : CBackgroundInfoLoader()
- , m_databaseHits{0}
- , m_tagReads{0}
+CMusicInfoLoader::CMusicInfoLoader() : CBackgroundInfoLoader()
{
m_mapFileItems = new CFileItemList;
diff --git a/xbmc/music/MusicInfoLoader.h b/xbmc/music/MusicInfoLoader.h
index d6cab41be5..be1c27ef64 100644
--- a/xbmc/music/MusicInfoLoader.h
+++ b/xbmc/music/MusicInfoLoader.h
@@ -39,8 +39,8 @@ protected:
MAPSONGS m_songsMap;
std::string m_strPrevPath;
CMusicDatabase m_musicDatabase;
- unsigned int m_databaseHits;
- unsigned int m_tagReads;
+ unsigned int m_databaseHits = 0;
+ unsigned int m_tagReads = 0;
CMusicThumbLoader *m_thumbLoader;
};
}
diff --git a/xbmc/network/WakeOnAccess.cpp b/xbmc/network/WakeOnAccess.cpp
index 189e082265..e00fd14d87 100644
--- a/xbmc/network/WakeOnAccess.cpp
+++ b/xbmc/network/WakeOnAccess.cpp
@@ -267,7 +267,7 @@ int NestDetect::m_nest = 0;
class ProgressDialogHelper
{
public:
- explicit ProgressDialogHelper (const std::string& heading) : m_dialog(0)
+ explicit ProgressDialogHelper(const std::string& heading)
{
if (CServiceBroker::GetAppMessenger()->IsProcessThread())
{
@@ -335,7 +335,7 @@ public:
}
private:
- CGUIDialogProgress* m_dialog;
+ CGUIDialogProgress* m_dialog = 0;
};
class NetworkStartWaiter : public WaitCondition
@@ -363,8 +363,7 @@ private:
class PingResponseWaiter : public WaitCondition, private IJobCallback
{
public:
- PingResponseWaiter (bool async, const CWakeOnAccess::WakeUpEntry& server)
- : m_server(server), m_jobId(0), m_hostOnline(false)
+ PingResponseWaiter(bool async, const CWakeOnAccess::WakeUpEntry& server) : m_server(server)
{
if (async)
{
@@ -427,8 +426,8 @@ private:
};
const CWakeOnAccess::WakeUpEntry& m_server;
- unsigned int m_jobId;
- bool m_hostOnline;
+ unsigned int m_jobId = 0;
+ bool m_hostOnline = false;
};
//
diff --git a/xbmc/network/WebServer.h b/xbmc/network/WebServer.h
index 4127524f00..a708270bf6 100644
--- a/xbmc/network/WebServer.h
+++ b/xbmc/network/WebServer.h
@@ -41,18 +41,12 @@ protected:
typedef struct ConnectionHandler
{
std::string fullUri;
- bool isNew;
+ bool isNew = true;
std::shared_ptr<IHTTPRequestHandler> requestHandler;
- struct MHD_PostProcessor *postprocessor;
- int errorStatus;
-
- explicit ConnectionHandler(const std::string& uri)
- : fullUri(uri)
- , isNew(true)
- , requestHandler(nullptr)
- , postprocessor(nullptr)
- , errorStatus(MHD_HTTP_OK)
- { }
+ struct MHD_PostProcessor* postprocessor = nullptr;
+ int errorStatus = MHD_HTTP_OK;
+
+ explicit ConnectionHandler(const std::string& uri) : fullUri(uri), requestHandler(nullptr) {}
} ConnectionHandler;
virtual void LogRequest(const char* uri) const;
diff --git a/xbmc/network/httprequesthandler/python/HTTPPythonInvoker.cpp b/xbmc/network/httprequesthandler/python/HTTPPythonInvoker.cpp
index 696c03910c..21e6a91f42 100644
--- a/xbmc/network/httprequesthandler/python/HTTPPythonInvoker.cpp
+++ b/xbmc/network/httprequesthandler/python/HTTPPythonInvoker.cpp
@@ -11,10 +11,9 @@
#include "CompileInfo.h"
#include "utils/StringUtils.h"
-CHTTPPythonInvoker::CHTTPPythonInvoker(ILanguageInvocationHandler* invocationHandler, HTTPPythonRequest* request)
- : CPythonInvoker(invocationHandler),
- m_request(request),
- m_internalError(false)
+CHTTPPythonInvoker::CHTTPPythonInvoker(ILanguageInvocationHandler* invocationHandler,
+ HTTPPythonRequest* request)
+ : CPythonInvoker(invocationHandler), m_request(request)
{ }
CHTTPPythonInvoker::~CHTTPPythonInvoker()
diff --git a/xbmc/network/httprequesthandler/python/HTTPPythonInvoker.h b/xbmc/network/httprequesthandler/python/HTTPPythonInvoker.h
index 83f1f349e5..c4217dbeae 100644
--- a/xbmc/network/httprequesthandler/python/HTTPPythonInvoker.h
+++ b/xbmc/network/httprequesthandler/python/HTTPPythonInvoker.h
@@ -28,5 +28,5 @@ protected:
void onError(const std::string& exceptionType = "", const std::string& exceptionValue = "", const std::string& exceptionTraceback = "") override;
HTTPPythonRequest* m_request;
- bool m_internalError;
+ bool m_internalError = false;
};
diff --git a/xbmc/network/upnp/UPnPPlayer.cpp b/xbmc/network/upnp/UPnPPlayer.cpp
index 0f0d52a4ea..3a4fe6b422 100644
--- a/xbmc/network/upnp/UPnPPlayer.cpp
+++ b/xbmc/network/upnp/UPnPPlayer.cpp
@@ -54,9 +54,7 @@ public:
: m_control(control),
m_transport(NULL),
m_device(device),
- m_instance(0),
m_callback(callback),
- m_postime(0),
m_logger(CServiceBroker::GetLogging().GetLogger("CUPnPPlayerController"))
{
m_posinfo = {};
@@ -141,14 +139,14 @@ public:
PLT_MediaController* m_control;
PLT_Service * m_transport;
PLT_DeviceDataReference m_device;
- NPT_UInt32 m_instance;
+ NPT_UInt32 m_instance = 0;
IPlayerCallback& m_callback;
NPT_Result m_resstatus;
CEvent m_resevent;
CCriticalSection m_section;
- unsigned int m_postime;
+ unsigned int m_postime = 0;
CEvent m_posevnt;
PLT_PositionInfo m_posinfo;
@@ -163,8 +161,6 @@ CUPnPPlayer::CUPnPPlayer(IPlayerCallback& callback, const char* uuid)
: IPlayer(callback),
m_control(NULL),
m_delegate(NULL),
- m_started(false),
- m_stopremote(false),
m_logger(CServiceBroker::GetLogging().GetLogger(StringUtils::Format("CUPnPPlayer[{}]", uuid)))
{
m_control = CUPnP::GetInstance()->m_MediaController;
diff --git a/xbmc/network/upnp/UPnPPlayer.h b/xbmc/network/upnp/UPnPPlayer.h
index aafd8c48a4..77e2a24cf8 100644
--- a/xbmc/network/upnp/UPnPPlayer.h
+++ b/xbmc/network/upnp/UPnPPlayer.h
@@ -67,8 +67,8 @@ private:
CUPnPPlayerController* m_delegate;
std::string m_current_uri;
std::string m_current_meta;
- bool m_started;
- bool m_stopremote;
+ bool m_started = false;
+ bool m_stopremote = false;
XbmcThreads::EndTime<> m_updateTimer;
Logger m_logger;
diff --git a/xbmc/peripherals/addons/PeripheralAddon.cpp b/xbmc/peripherals/addons/PeripheralAddon.cpp
index d036cc8dd6..e5cbc50ad5 100644
--- a/xbmc/peripherals/addons/PeripheralAddon.cpp
+++ b/xbmc/peripherals/addons/PeripheralAddon.cpp
@@ -51,10 +51,7 @@ using namespace XFILE;
#endif
CPeripheralAddon::CPeripheralAddon(const ADDON::AddonInfoPtr& addonInfo, CPeripherals& manager)
- : IAddonInstanceHandler(ADDON_INSTANCE_PERIPHERAL, addonInfo),
- m_manager(manager),
- m_bSupportsJoystickRumble(false),
- m_bSupportsJoystickPowerOff(false)
+ : IAddonInstanceHandler(ADDON_INSTANCE_PERIPHERAL, addonInfo), m_manager(manager)
{
m_bProvidesJoysticks =
addonInfo->Type(ADDON::AddonType::PERIPHERALDLL)->GetValue("@provides_joysticks").asBoolean();
diff --git a/xbmc/peripherals/addons/PeripheralAddon.h b/xbmc/peripherals/addons/PeripheralAddon.h
index f967c20b1a..546d0fb12c 100644
--- a/xbmc/peripherals/addons/PeripheralAddon.h
+++ b/xbmc/peripherals/addons/PeripheralAddon.h
@@ -161,8 +161,8 @@ private:
/* @brief Add-on properties */
bool m_bProvidesJoysticks;
- bool m_bSupportsJoystickRumble;
- bool m_bSupportsJoystickPowerOff;
+ bool m_bSupportsJoystickRumble = false;
+ bool m_bSupportsJoystickPowerOff = false;
bool m_bProvidesButtonMaps;
/* @brief Map of peripherals belonging to the add-on */
diff --git a/xbmc/peripherals/bus/PeripheralBus.cpp b/xbmc/peripherals/bus/PeripheralBus.cpp
index e570e79297..a1229eeeff 100644
--- a/xbmc/peripherals/bus/PeripheralBus.cpp
+++ b/xbmc/peripherals/bus/PeripheralBus.cpp
@@ -31,7 +31,6 @@ CPeripheralBus::CPeripheralBus(const std::string& threadname,
PeripheralBusType type)
: CThread(threadname.c_str()),
m_iRescanTime(PERIPHERAL_DEFAULT_RESCAN_INTERVAL),
- m_bNeedsPolling(true),
m_manager(manager),
m_type(type),
m_triggerEvent(true)
diff --git a/xbmc/peripherals/bus/PeripheralBus.h b/xbmc/peripherals/bus/PeripheralBus.h
index c23abff7b7..3d422ab36d 100644
--- a/xbmc/peripherals/bus/PeripheralBus.h
+++ b/xbmc/peripherals/bus/PeripheralBus.h
@@ -192,7 +192,8 @@ protected:
PeripheralVector m_peripherals;
std::chrono::milliseconds m_iRescanTime;
- bool m_bNeedsPolling; /*!< true when this bus needs to be polled for new devices, false when it
+ bool m_bNeedsPolling =
+ true; /*!< true when this bus needs to be polled for new devices, false when it
uses callbacks to notify this bus of changed */
CPeripherals& m_manager;
const PeripheralBusType m_type;
diff --git a/xbmc/peripherals/devices/Peripheral.cpp b/xbmc/peripherals/devices/Peripheral.cpp
index 2c656a392b..5e43bd399c 100644
--- a/xbmc/peripherals/devices/Peripheral.cpp
+++ b/xbmc/peripherals/devices/Peripheral.cpp
@@ -54,9 +54,6 @@ CPeripheral::CPeripheral(CPeripherals& manager,
m_iVendorId(scanResult.m_iVendorId),
m_iProductId(scanResult.m_iProductId),
m_strVersionInfo(g_localizeStrings.Get(13205)), // "unknown"
- m_bInitialised(false),
- m_bHidden(false),
- m_bError(false),
m_bus(bus)
{
PeripheralTypeTranslator::FormatHexString(scanResult.m_iVendorId, m_strVendorId);
diff --git a/xbmc/peripherals/devices/Peripheral.h b/xbmc/peripherals/devices/Peripheral.h
index 8c4049b67a..2e62a3ff8e 100644
--- a/xbmc/peripherals/devices/Peripheral.h
+++ b/xbmc/peripherals/devices/Peripheral.h
@@ -285,9 +285,9 @@ protected:
int m_iProductId;
std::string m_strProductId;
std::string m_strVersionInfo;
- bool m_bInitialised;
- bool m_bHidden;
- bool m_bError;
+ bool m_bInitialised = false;
+ bool m_bHidden = false;
+ bool m_bError = false;
std::vector<PeripheralFeature> m_features;
PeripheralVector m_subDevices;
std::map<std::string, PeripheralDeviceSetting> m_settings;
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index bc62bea65c..fa8dce7cdc 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -1524,11 +1524,7 @@ bool CPeripheralCecAdapter::WriteLogicalAddresses(const cec_logical_addresses& a
CPeripheralCecAdapterUpdateThread::CPeripheralCecAdapterUpdateThread(
CPeripheralCecAdapter* adapter, libcec_configuration* configuration)
- : CThread("CECAdapterUpdate"),
- m_adapter(adapter),
- m_configuration(*configuration),
- m_bNextConfigurationScheduled(false),
- m_bIsUpdating(true)
+ : CThread("CECAdapterUpdate"), m_adapter(adapter), m_configuration(*configuration)
{
m_nextConfiguration.Clear();
m_event.Reset();
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.h b/xbmc/peripherals/devices/PeripheralCecAdapter.h
index b3755b352b..eb31d96447 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.h
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.h
@@ -218,8 +218,8 @@ protected:
CCriticalSection m_critSection;
CEC::libcec_configuration m_configuration;
CEC::libcec_configuration m_nextConfiguration;
- bool m_bNextConfigurationScheduled;
- bool m_bIsUpdating;
+ bool m_bNextConfigurationScheduled = false;
+ bool m_bIsUpdating = true;
};
} // namespace PERIPHERALS
diff --git a/xbmc/peripherals/devices/PeripheralJoystick.cpp b/xbmc/peripherals/devices/PeripheralJoystick.cpp
index e2087a7bc7..4033e94f5f 100644
--- a/xbmc/peripherals/devices/PeripheralJoystick.cpp
+++ b/xbmc/peripherals/devices/PeripheralJoystick.cpp
@@ -38,14 +38,7 @@ using namespace PERIPHERALS;
CPeripheralJoystick::CPeripheralJoystick(CPeripherals& manager,
const PeripheralScanResult& scanResult,
CPeripheralBus* bus)
- : CPeripheral(manager, scanResult, bus),
- m_requestedPort(JOYSTICK_PORT_UNKNOWN),
- m_buttonCount(0),
- m_hatCount(0),
- m_axisCount(0),
- m_motorCount(0),
- m_supportsPowerOff(false),
- m_rumbleGenerator(new CRumbleGenerator)
+ : CPeripheral(manager, scanResult, bus), m_rumbleGenerator(new CRumbleGenerator)
{
m_features.push_back(FEATURE_JOYSTICK);
// FEATURE_RUMBLE conditionally added via SetMotorCount()
diff --git a/xbmc/peripherals/devices/PeripheralJoystick.h b/xbmc/peripherals/devices/PeripheralJoystick.h
index aa55ad7fd7..5027b20e81 100644
--- a/xbmc/peripherals/devices/PeripheralJoystick.h
+++ b/xbmc/peripherals/devices/PeripheralJoystick.h
@@ -125,12 +125,12 @@ protected:
// State parameters
std::string m_strProvider;
- int m_requestedPort;
- unsigned int m_buttonCount;
- unsigned int m_hatCount;
- unsigned int m_axisCount;
- unsigned int m_motorCount;
- bool m_supportsPowerOff;
+ int m_requestedPort = JOYSTICK_PORT_UNKNOWN;
+ unsigned int m_buttonCount = 0;
+ unsigned int m_hatCount = 0;
+ unsigned int m_axisCount = 0;
+ unsigned int m_motorCount = 0;
+ bool m_supportsPowerOff = false;
CDateTime m_lastActive;
std::queue<std::string> m_controllersToInstall;
std::vector<std::future<void>> m_installTasks;
diff --git a/xbmc/pictures/GUIWindowSlideShow.cpp b/xbmc/pictures/GUIWindowSlideShow.cpp
index 753352e43d..e2f9db7bba 100644
--- a/xbmc/pictures/GUIWindowSlideShow.cpp
+++ b/xbmc/pictures/GUIWindowSlideShow.cpp
@@ -64,14 +64,7 @@ using namespace std::chrono_literals;
static float zoomamount[10] = { 1.0f, 1.2f, 1.5f, 2.0f, 2.8f, 4.0f, 6.0f, 9.0f, 13.5f, 20.0f };
-CBackgroundPicLoader::CBackgroundPicLoader()
- : CThread("BgPicLoader")
- , m_iPic{0}
- , m_iSlideNumber{0}
- , m_maxWidth{0}
- , m_maxHeight{0}
- , m_isLoading{false}
- , m_pCallback{nullptr}
+CBackgroundPicLoader::CBackgroundPicLoader() : CThread("BgPicLoader")
{
}
diff --git a/xbmc/pictures/GUIWindowSlideShow.h b/xbmc/pictures/GUIWindowSlideShow.h
index 61e021035f..0389e5a755 100644
--- a/xbmc/pictures/GUIWindowSlideShow.h
+++ b/xbmc/pictures/GUIWindowSlideShow.h
@@ -36,16 +36,16 @@ public:
private:
void Process() override;
- int m_iPic;
- int m_iSlideNumber;
+ int m_iPic = 0;
+ int m_iSlideNumber = 0;
std::string m_strFileName;
- int m_maxWidth;
- int m_maxHeight;
+ int m_maxWidth = 0;
+ int m_maxHeight = 0;
CEvent m_loadPic;
- bool m_isLoading;
+ bool m_isLoading = false;
- CGUIWindowSlideShow *m_pCallback;
+ CGUIWindowSlideShow* m_pCallback = nullptr;
};
class CGUIWindowSlideShow : public CGUIDialog
diff --git a/xbmc/platform/android/activity/EventLoop.cpp b/xbmc/platform/android/activity/EventLoop.cpp
index cd17951ab6..ac5fc61565 100644
--- a/xbmc/platform/android/activity/EventLoop.cpp
+++ b/xbmc/platform/android/activity/EventLoop.cpp
@@ -13,9 +13,7 @@
#define IS_FROM_SOURCE(v, s) ((v & s) == s)
CEventLoop::CEventLoop(android_app* application)
- : m_enabled(false),
- m_application(application),
- m_activityHandler(NULL), m_inputHandler(NULL)
+ : m_application(application), m_activityHandler(NULL), m_inputHandler(NULL)
{
if (m_application == NULL)
return;
diff --git a/xbmc/platform/android/activity/EventLoop.h b/xbmc/platform/android/activity/EventLoop.h
index 4cd43c3bdd..9898c11499 100644
--- a/xbmc/platform/android/activity/EventLoop.h
+++ b/xbmc/platform/android/activity/EventLoop.h
@@ -31,7 +31,7 @@ private:
static void activityCallback(android_app* application, int32_t command);
static int32_t inputCallback(android_app* application, AInputEvent* event);
- bool m_enabled;
+ bool m_enabled = false;
android_app* m_application;
IActivityHandler* m_activityHandler;
IInputHandler* m_inputHandler;
diff --git a/xbmc/platform/android/media/drm/MediaDrmCryptoSession.cpp b/xbmc/platform/android/media/drm/MediaDrmCryptoSession.cpp
index d9da34e3ed..e275bd12d4 100644
--- a/xbmc/platform/android/media/drm/MediaDrmCryptoSession.cpp
+++ b/xbmc/platform/android/media/drm/MediaDrmCryptoSession.cpp
@@ -45,13 +45,10 @@ void CMediaDrmCryptoSession::Register()
CCryptoSession::RegisterInterface(CMediaDrmCryptoSession::Create);
}
-CMediaDrmCryptoSession::CMediaDrmCryptoSession(const std::string& UUID, const std::string& cipherAlgo, const std::string& macAlgo)
- : m_mediaDrm(nullptr)
- , m_cryptoSession(nullptr)
- , m_cipherAlgo(cipherAlgo)
- , m_macAlgo(macAlgo)
- , m_hasKeys(false)
- , m_sessionId(nullptr)
+CMediaDrmCryptoSession::CMediaDrmCryptoSession(const std::string& UUID,
+ const std::string& cipherAlgo,
+ const std::string& macAlgo)
+ : m_cipherAlgo(cipherAlgo), m_macAlgo(macAlgo)
{
if (UUID.length() != 36 || UUID[8] != '-' || UUID[13] != '-' || UUID[18] != '-' ||
UUID[23] != '-')
diff --git a/xbmc/platform/android/media/drm/MediaDrmCryptoSession.h b/xbmc/platform/android/media/drm/MediaDrmCryptoSession.h
index 3ea5e8e0b3..2919e4ae83 100644
--- a/xbmc/platform/android/media/drm/MediaDrmCryptoSession.h
+++ b/xbmc/platform/android/media/drm/MediaDrmCryptoSession.h
@@ -61,16 +61,16 @@ namespace DRM
void CloseSession();
bool ProvisionRequest();
- CJNIMediaDrm* m_mediaDrm;
- CJNIMediaDrmCryptoSession* m_cryptoSession;
+ CJNIMediaDrm* m_mediaDrm = nullptr;
+ CJNIMediaDrmCryptoSession* m_cryptoSession = nullptr;
std::string m_cipherAlgo;
std::string m_macAlgo;
std::string m_keySetId;
- bool m_hasKeys;
+ bool m_hasKeys = false;
- CharVecBuffer* m_sessionId;
+ CharVecBuffer* m_sessionId = nullptr;
};
} //namespace
diff --git a/xbmc/platform/android/network/ZeroconfBrowserAndroid.cpp b/xbmc/platform/android/network/ZeroconfBrowserAndroid.cpp
index 67f4d5d0d3..dd6db2576b 100644
--- a/xbmc/platform/android/network/ZeroconfBrowserAndroid.cpp
+++ b/xbmc/platform/android/network/ZeroconfBrowserAndroid.cpp
@@ -200,9 +200,7 @@ void CZeroconfBrowserAndroid::removeDiscoveredService(CZeroconfBrowserAndroidDis
/******************************************************************/
CZeroconfBrowserAndroidDiscover::CZeroconfBrowserAndroidDiscover(CZeroconfBrowserAndroid* browser)
- : CJNIXBMCNsdManagerDiscoveryListener()
- , m_browser(browser)
- , m_isActive(false)
+ : CJNIXBMCNsdManagerDiscoveryListener(), m_browser(browser)
{
}
diff --git a/xbmc/platform/android/network/ZeroconfBrowserAndroid.h b/xbmc/platform/android/network/ZeroconfBrowserAndroid.h
index eda7e8c08b..d44535699b 100644
--- a/xbmc/platform/android/network/ZeroconfBrowserAndroid.h
+++ b/xbmc/platform/android/network/ZeroconfBrowserAndroid.h
@@ -36,7 +36,7 @@ public:
protected:
CZeroconfBrowserAndroid* m_browser;
- bool m_isActive;
+ bool m_isActive = false;
};
class CZeroconfBrowserAndroidResolve : public jni::CJNIXBMCNsdManagerResolveListener
diff --git a/xbmc/pvr/epg/EpgSearchPath.cpp b/xbmc/pvr/epg/EpgSearchPath.cpp
index 9b24e10695..7c97152ab4 100644
--- a/xbmc/pvr/epg/EpgSearchPath.cpp
+++ b/xbmc/pvr/epg/EpgSearchPath.cpp
@@ -34,9 +34,7 @@ CPVREpgSearchPath::CPVREpgSearchPath(const CPVREpgSearchFilter& search)
search.IsRadio() ? "radio" : "tv",
search.GetDatabaseId())),
m_bValid(true),
- m_bRoot(false),
- m_bRadio(search.IsRadio()),
- m_bSavedSearchesRoot(false)
+ m_bRadio(search.IsRadio())
{
}
diff --git a/xbmc/pvr/guilib/GUIEPGGridContainer.cpp b/xbmc/pvr/guilib/GUIEPGGridContainer.cpp
index d88dc86692..8d79ab5edf 100644
--- a/xbmc/pvr/guilib/GUIEPGGridContainer.cpp
+++ b/xbmc/pvr/guilib/GUIEPGGridContainer.cpp
@@ -54,50 +54,14 @@ CGUIEPGGridContainer::CGUIEPGGridContainer(int parentID,
const CTextureInfo& progressIndicatorTexture)
: IGUIContainer(parentID, controlID, posX, posY, width, height),
m_orientation(orientation),
- m_channelLayout(nullptr),
- m_focusedChannelLayout(nullptr),
- m_programmeLayout(nullptr),
- m_focusedProgrammeLayout(nullptr),
- m_rulerLayout(nullptr),
- m_rulerDateLayout(nullptr),
- m_pageControl(0),
m_rulerUnit(rulerUnit),
- m_channelsPerPage(0),
- m_programmesPerPage(0),
- m_channelCursor(0),
- m_channelOffset(0),
m_blocksPerPage(timeBlocks),
- m_blockCursor(0),
- m_blockOffset(0),
- m_blockTravelAxis(0),
m_cacheChannelItems(preloadItems),
m_cacheProgrammeItems(preloadItems),
m_cacheRulerItems(preloadItems),
- m_rulerDateHeight(0),
- m_rulerDateWidth(0),
- m_rulerPosX(0),
- m_rulerPosY(0),
- m_rulerHeight(0),
- m_rulerWidth(0),
- m_channelPosX(0),
- m_channelPosY(0),
- m_channelHeight(0),
- m_channelWidth(0),
- m_gridPosX(0),
- m_gridPosY(0),
- m_gridWidth(0),
- m_gridHeight(0),
- m_blockSize(0),
- m_analogScrollCount(0),
m_guiProgressIndicatorTexture(
CGUITexture::CreateTexture(posX, posY, width, height, progressIndicatorTexture)),
m_scrollTime(scrollTime ? scrollTime : 1),
- m_programmeScrollLastTime(0),
- m_programmeScrollSpeed(0),
- m_programmeScrollOffset(0),
- m_channelScrollLastTime(0),
- m_channelScrollSpeed(0),
- m_channelScrollOffset(0),
m_gridModel(new CGUIEPGGridContainerModel)
{
ControlType = GUICONTAINER_EPGGRID;
diff --git a/xbmc/pvr/guilib/GUIEPGGridContainer.h b/xbmc/pvr/guilib/GUIEPGGridContainer.h
index 360ade9eb6..a7be3897a1 100644
--- a/xbmc/pvr/guilib/GUIEPGGridContainer.h
+++ b/xbmc/pvr/guilib/GUIEPGGridContainer.h
@@ -184,14 +184,14 @@ namespace PVR
std::vector<CGUIListItemLayout> m_rulerLayouts;
std::vector<CGUIListItemLayout> m_rulerDateLayouts;
- CGUIListItemLayout* m_channelLayout;
- CGUIListItemLayout* m_focusedChannelLayout;
- CGUIListItemLayout* m_programmeLayout;
- CGUIListItemLayout* m_focusedProgrammeLayout;
- CGUIListItemLayout* m_rulerLayout;
- CGUIListItemLayout* m_rulerDateLayout;
+ CGUIListItemLayout* m_channelLayout = nullptr;
+ CGUIListItemLayout* m_focusedChannelLayout = nullptr;
+ CGUIListItemLayout* m_programmeLayout = nullptr;
+ CGUIListItemLayout* m_focusedProgrammeLayout = nullptr;
+ CGUIListItemLayout* m_rulerLayout = nullptr;
+ CGUIListItemLayout* m_rulerDateLayout = nullptr;
- int m_pageControl;
+ int m_pageControl = 0;
void GetChannelCacheOffsets(int& cacheBefore, int& cacheAfter);
void GetProgrammeCacheOffsets(int& cacheBefore, int& cacheAfter);
@@ -218,34 +218,34 @@ namespace PVR
int GetProgrammeScrollOffset() const;
int m_rulerUnit; //! number of blocks that makes up one element of the ruler
- int m_channelsPerPage;
- int m_programmesPerPage;
- int m_channelCursor;
- int m_channelOffset;
+ int m_channelsPerPage = 0;
+ int m_programmesPerPage = 0;
+ int m_channelCursor = 0;
+ int m_channelOffset = 0;
int m_blocksPerPage;
- int m_blockCursor;
- int m_blockOffset;
- int m_blockTravelAxis;
+ int m_blockCursor = 0;
+ int m_blockOffset = 0;
+ int m_blockTravelAxis = 0;
int m_cacheChannelItems;
int m_cacheProgrammeItems;
int m_cacheRulerItems;
- float m_rulerDateHeight; //! height of ruler date item
- float m_rulerDateWidth; //! width of ruler date item
- float m_rulerPosX; //! X position of first ruler item
- float m_rulerPosY; //! Y position of first ruler item
- float m_rulerHeight; //! height of the scrolling timeline above the ruler items
- float m_rulerWidth; //! width of each element of the ruler
- float m_channelPosX; //! X position of first channel row
- float m_channelPosY; //! Y position of first channel row
- float m_channelHeight; //! height of the channel item
- float m_channelWidth; //! width of the channel item
- float m_gridPosX; //! X position of first grid item
- float m_gridPosY; //! Y position of first grid item
- float m_gridWidth; //! width of the epg grid control
- float m_gridHeight; //! height of the epg grid control
- float m_blockSize; //! a block's width in pixels
- float m_analogScrollCount;
+ float m_rulerDateHeight = 0; //! height of ruler date item
+ float m_rulerDateWidth = 0; //! width of ruler date item
+ float m_rulerPosX = 0; //! X position of first ruler item
+ float m_rulerPosY = 0; //! Y position of first ruler item
+ float m_rulerHeight = 0; //! height of the scrolling timeline above the ruler items
+ float m_rulerWidth = 0; //! width of each element of the ruler
+ float m_channelPosX = 0; //! X position of first channel row
+ float m_channelPosY = 0; //! Y position of first channel row
+ float m_channelHeight = 0; //! height of the channel item
+ float m_channelWidth = 0; //! width of the channel item
+ float m_gridPosX = 0; //! X position of first grid item
+ float m_gridPosY = 0; //! Y position of first grid item
+ float m_gridWidth = 0; //! width of the epg grid control
+ float m_gridHeight = 0; //! height of the epg grid control
+ float m_blockSize = 0; //! a block's width in pixels
+ float m_analogScrollCount = 0;
std::unique_ptr<CGUITexture> m_guiProgressIndicatorTexture;
@@ -257,13 +257,13 @@ namespace PVR
int m_scrollTime;
- int m_programmeScrollLastTime;
- float m_programmeScrollSpeed;
- float m_programmeScrollOffset;
+ int m_programmeScrollLastTime = 0;
+ float m_programmeScrollSpeed = 0;
+ float m_programmeScrollOffset = 0;
- int m_channelScrollLastTime;
- float m_channelScrollSpeed;
- float m_channelScrollOffset;
+ int m_channelScrollLastTime = 0;
+ float m_channelScrollSpeed = 0;
+ float m_channelScrollOffset = 0;
mutable CCriticalSection m_critSection;
std::unique_ptr<CGUIEPGGridContainerModel> m_gridModel;
diff --git a/xbmc/pvr/windows/GUIWindowPVRBase.cpp b/xbmc/pvr/windows/GUIWindowPVRBase.cpp
index 0e105db7f8..aa11d866f6 100644
--- a/xbmc/pvr/windows/GUIWindowPVRBase.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVRBase.cpp
@@ -129,11 +129,10 @@ bool CGUIPVRChannelGroupsSelector::SelectChannelGroup(const std::shared_ptr<CPVR
return false;
}
-CGUIWindowPVRBase::CGUIWindowPVRBase(bool bRadio, int id, const std::string& xmlFile) :
- CGUIMediaWindow(id, xmlFile.c_str()),
- m_bRadio(bRadio),
- m_channelGroupsSelector(new CGUIPVRChannelGroupsSelector),
- m_progressHandle(nullptr)
+CGUIWindowPVRBase::CGUIWindowPVRBase(bool bRadio, int id, const std::string& xmlFile)
+ : CGUIMediaWindow(id, xmlFile.c_str()),
+ m_bRadio(bRadio),
+ m_channelGroupsSelector(new CGUIPVRChannelGroupsSelector)
{
// prevent removable drives to appear in directory listing (base class default behavior).
m_rootDir.AllowNonLocalSources(false);
diff --git a/xbmc/pvr/windows/GUIWindowPVRBase.h b/xbmc/pvr/windows/GUIWindowPVRBase.h
index 1fe27bb828..f8c73bfe7e 100644
--- a/xbmc/pvr/windows/GUIWindowPVRBase.h
+++ b/xbmc/pvr/windows/GUIWindowPVRBase.h
@@ -133,6 +133,7 @@ namespace PVR
std::unique_ptr<CGUIPVRChannelGroupsSelector> m_channelGroupsSelector;
std::shared_ptr<CPVRChannelGroup> m_channelGroup;
XbmcThreads::EndTime<> m_refreshTimeout;
- CGUIDialogProgressBarHandle* m_progressHandle; /*!< progress dialog that is displayed while the pvr manager is loading */
+ CGUIDialogProgressBarHandle* m_progressHandle =
+ nullptr; /*!< progress dialog that is displayed while the pvr manager is loading */
};
}
diff --git a/xbmc/pvr/windows/GUIWindowPVRChannels.cpp b/xbmc/pvr/windows/GUIWindowPVRChannels.cpp
index 41416b76a7..6b6e87776b 100644
--- a/xbmc/pvr/windows/GUIWindowPVRChannels.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVRChannels.cpp
@@ -46,7 +46,7 @@ using namespace PVR;
CGUIWindowPVRChannelsBase::CGUIWindowPVRChannelsBase(bool bRadio,
int id,
const std::string& xmlFile)
- : CGUIWindowPVRBase(bRadio, id, xmlFile), m_bShowHiddenChannels(false)
+ : CGUIWindowPVRBase(bRadio, id, xmlFile)
{
CServiceBroker::GetPVRManager().Get<PVR::GUI::Channels>().RegisterChannelNumberInputHandler(this);
}
diff --git a/xbmc/pvr/windows/GUIWindowPVRChannels.h b/xbmc/pvr/windows/GUIWindowPVRChannels.h
index ef8e848d45..257b595264 100644
--- a/xbmc/pvr/windows/GUIWindowPVRChannels.h
+++ b/xbmc/pvr/windows/GUIWindowPVRChannels.h
@@ -42,7 +42,7 @@ private:
void UpdateEpg(const CFileItemPtr& item);
protected:
- bool m_bShowHiddenChannels;
+ bool m_bShowHiddenChannels = false;
};
class CGUIWindowPVRTVChannels : public CGUIWindowPVRChannelsBase
diff --git a/xbmc/pvr/windows/GUIWindowPVRSearch.cpp b/xbmc/pvr/windows/GUIWindowPVRSearch.cpp
index f0cd3fedce..1cf62a6302 100644
--- a/xbmc/pvr/windows/GUIWindowPVRSearch.cpp
+++ b/xbmc/pvr/windows/GUIWindowPVRSearch.cpp
@@ -98,7 +98,7 @@ void AsyncSearchAction::Run()
} // unnamed namespace
CGUIWindowPVRSearchBase::CGUIWindowPVRSearchBase(bool bRadio, int id, const std::string& xmlFile)
- : CGUIWindowPVRBase(bRadio, id, xmlFile), m_bSearchConfirmed(false)
+ : CGUIWindowPVRBase(bRadio, id, xmlFile)
{
}
diff --git a/xbmc/pvr/windows/GUIWindowPVRSearch.h b/xbmc/pvr/windows/GUIWindowPVRSearch.h
index d6f6a35195..de807994db 100644
--- a/xbmc/pvr/windows/GUIWindowPVRSearch.h
+++ b/xbmc/pvr/windows/GUIWindowPVRSearch.h
@@ -60,7 +60,7 @@ private:
void SetSearchFilter(const std::shared_ptr<CPVREpgSearchFilter>& searchFilter);
- bool m_bSearchConfirmed;
+ bool m_bSearchConfirmed = false;
std::shared_ptr<CPVREpgSearchFilter> m_searchfilter;
};
diff --git a/xbmc/settings/dialogs/GUIDialogSettingsBase.cpp b/xbmc/settings/dialogs/GUIDialogSettingsBase.cpp
index 32d3958845..d466e5da1f 100644
--- a/xbmc/settings/dialogs/GUIDialogSettingsBase.cpp
+++ b/xbmc/settings/dialogs/GUIDialogSettingsBase.cpp
@@ -54,24 +54,17 @@
CGUIDialogSettingsBase::CGUIDialogSettingsBase(int windowId, const std::string& xmlFile)
: CGUIDialog(windowId, xmlFile),
- m_iSetting(0),
- m_iCategory(0),
m_resetSetting(NULL),
m_dummyCategory(NULL),
m_pOriginalSpin(NULL),
m_pOriginalSlider(NULL),
m_pOriginalRadioButton(NULL),
- m_pOriginalColorButton(nullptr),
m_pOriginalCategoryButton(NULL),
m_pOriginalButton(NULL),
m_pOriginalEdit(NULL),
m_pOriginalImage(NULL),
m_pOriginalGroupTitle(NULL),
- m_newOriginalEdit(false),
- m_delayedTimer(this),
- m_confirmed(false),
- m_focusedControl(0),
- m_fadedControl(0)
+ m_delayedTimer(this)
{
m_loadType = KEEP_IN_MEMORY;
}
diff --git a/xbmc/settings/dialogs/GUIDialogSettingsBase.h b/xbmc/settings/dialogs/GUIDialogSettingsBase.h
index a633c65f6d..38fe7c9e0f 100644
--- a/xbmc/settings/dialogs/GUIDialogSettingsBase.h
+++ b/xbmc/settings/dialogs/GUIDialogSettingsBase.h
@@ -164,26 +164,26 @@ protected:
std::vector<std::shared_ptr<CSettingCategory>> m_categories;
std::vector<BaseSettingControlPtr> m_settingControls;
- int m_iSetting;
- int m_iCategory;
+ int m_iSetting = 0;
+ int m_iCategory = 0;
std::shared_ptr<CSettingAction> m_resetSetting;
std::shared_ptr<CSettingCategory> m_dummyCategory;
CGUISpinControlEx* m_pOriginalSpin;
CGUISettingsSliderControl* m_pOriginalSlider;
CGUIRadioButtonControl* m_pOriginalRadioButton;
- CGUIColorButtonControl* m_pOriginalColorButton;
+ CGUIColorButtonControl* m_pOriginalColorButton = nullptr;
CGUIButtonControl* m_pOriginalCategoryButton;
CGUIButtonControl* m_pOriginalButton;
CGUIEditControl* m_pOriginalEdit;
CGUIImage* m_pOriginalImage;
CGUILabelControl* m_pOriginalGroupTitle;
- bool m_newOriginalEdit;
+ bool m_newOriginalEdit = false;
BaseSettingControlPtr
m_delayedSetting; ///< Current delayed setting \sa CBaseSettingControl::SetDelayed()
CTimer m_delayedTimer; ///< Delayed setting timer
- bool m_confirmed;
- int m_focusedControl, m_fadedControl;
+ bool m_confirmed = false;
+ int m_focusedControl = 0, m_fadedControl = 0;
};
diff --git a/xbmc/settings/dialogs/GUIDialogSettingsManualBase.cpp b/xbmc/settings/dialogs/GUIDialogSettingsManualBase.cpp
index 84114db80c..4b6b52ea43 100644
--- a/xbmc/settings/dialogs/GUIDialogSettingsManualBase.cpp
+++ b/xbmc/settings/dialogs/GUIDialogSettingsManualBase.cpp
@@ -21,9 +21,8 @@
#include <string>
#include <vector>
-CGUIDialogSettingsManualBase::CGUIDialogSettingsManualBase(int windowId, const std::string &xmlFile)
+CGUIDialogSettingsManualBase::CGUIDialogSettingsManualBase(int windowId, const std::string& xmlFile)
: CGUIDialogSettingsManagerBase(windowId, xmlFile)
- , m_settingsManager(nullptr)
{ }
CGUIDialogSettingsManualBase::~CGUIDialogSettingsManualBase()
diff --git a/xbmc/settings/dialogs/GUIDialogSettingsManualBase.h b/xbmc/settings/dialogs/GUIDialogSettingsManualBase.h
index 338259cb13..b73bd01c45 100644
--- a/xbmc/settings/dialogs/GUIDialogSettingsManualBase.h
+++ b/xbmc/settings/dialogs/GUIDialogSettingsManualBase.h
@@ -645,6 +645,6 @@ private:
bool visible,
int help);
- mutable CSettingsManager *m_settingsManager;
+ mutable CSettingsManager* m_settingsManager = nullptr;
std::shared_ptr<CSettingSection> m_section;
};
diff --git a/xbmc/settings/windows/GUIControlSettings.cpp b/xbmc/settings/windows/GUIControlSettings.cpp
index fcbf1fa908..63897792f6 100644
--- a/xbmc/settings/windows/GUIControlSettings.cpp
+++ b/xbmc/settings/windows/GUIControlSettings.cpp
@@ -295,11 +295,7 @@ static bool GetStringOptions(const SettingConstPtr& setting,
CGUIControlBaseSetting::CGUIControlBaseSetting(int id,
std::shared_ptr<CSetting> pSetting,
ILocalizer* localizer)
- : m_id(id),
- m_pSetting(std::move(pSetting)),
- m_localizer(localizer),
- m_delayed(false),
- m_valid(true)
+ : m_id(id), m_pSetting(std::move(pSetting)), m_localizer(localizer)
{
}
diff --git a/xbmc/settings/windows/GUIControlSettings.h b/xbmc/settings/windows/GUIControlSettings.h
index 777b60d207..36f863671b 100644
--- a/xbmc/settings/windows/GUIControlSettings.h
+++ b/xbmc/settings/windows/GUIControlSettings.h
@@ -91,8 +91,8 @@ protected:
int m_id;
std::shared_ptr<CSetting> m_pSetting;
ILocalizer* m_localizer;
- bool m_delayed;
- bool m_valid;
+ bool m_delayed = false;
+ bool m_valid = true;
};
class CGUIControlRadioButtonSetting : public CGUIControlBaseSetting
diff --git a/xbmc/threads/test/TestEvent.cpp b/xbmc/threads/test/TestEvent.cpp
index c4526b333c..5f9fd10fb1 100644
--- a/xbmc/threads/test/TestEvent.cpp
+++ b/xbmc/threads/test/TestEvent.cpp
@@ -26,9 +26,9 @@ class waiter : public IRunnable
public:
bool& result;
- volatile bool waiting;
+ volatile bool waiting = false;
- waiter(CEvent& o, bool& flag) : event(o), result(flag), waiting(false) {}
+ waiter(CEvent& o, bool& flag) : event(o), result(flag) {}
void Run() override
{
@@ -46,10 +46,10 @@ class timed_waiter : public IRunnable
public:
int& result;
- volatile bool waiting;
+ volatile bool waiting = false;
timed_waiter(CEvent& o, int& flag, std::chrono::milliseconds waitTimeMillis)
- : event(o), waitTime(waitTimeMillis), result(flag), waiting(false)
+ : event(o), waitTime(waitTimeMillis), result(flag)
{
}
diff --git a/xbmc/utils/BitstreamReader.cpp b/xbmc/utils/BitstreamReader.cpp
index 6f2a7ffabe..8900a40a15 100644
--- a/xbmc/utils/BitstreamReader.cpp
+++ b/xbmc/utils/BitstreamReader.cpp
@@ -8,12 +8,8 @@
#include "BitstreamReader.h"
-CBitstreamReader::CBitstreamReader(const uint8_t *buf, int len)
- : buffer(buf)
- , start(buf)
- , offbits(0)
- , length(len)
- , oflow(0)
+CBitstreamReader::CBitstreamReader(const uint8_t* buf, int len)
+ : buffer(buf), start(buf), length(len)
{
}
diff --git a/xbmc/utils/BitstreamReader.h b/xbmc/utils/BitstreamReader.h
index 89fa2b205f..5d818d3767 100644
--- a/xbmc/utils/BitstreamReader.h
+++ b/xbmc/utils/BitstreamReader.h
@@ -20,7 +20,7 @@ public:
private:
const uint8_t *buffer, *start;
- int offbits, length, oflow;
+ int offbits = 0, length, oflow = 0;
};
const uint8_t* find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state);
diff --git a/xbmc/utils/BitstreamWriter.cpp b/xbmc/utils/BitstreamWriter.cpp
index 43c07885ae..9d247bb077 100644
--- a/xbmc/utils/BitstreamWriter.cpp
+++ b/xbmc/utils/BitstreamWriter.cpp
@@ -8,12 +8,8 @@
#include "BitstreamWriter.h"
-CBitstreamWriter::CBitstreamWriter(uint8_t *buffer, unsigned int buffer_size, int writer_le)
- : writer_le(writer_le)
- , bit_buf(0)
- , bit_left(32)
- , buf(buffer)
- , buf_ptr(buf)
+CBitstreamWriter::CBitstreamWriter(uint8_t* buffer, unsigned int buffer_size, int writer_le)
+ : writer_le(writer_le), buf(buffer), buf_ptr(buf)
{
}
diff --git a/xbmc/utils/BitstreamWriter.h b/xbmc/utils/BitstreamWriter.h
index 91257b2223..34390d8f8e 100644
--- a/xbmc/utils/BitstreamWriter.h
+++ b/xbmc/utils/BitstreamWriter.h
@@ -20,8 +20,8 @@ public:
private:
int writer_le;
- uint32_t bit_buf;
- int bit_left;
+ uint32_t bit_buf = 0;
+ int bit_left = 32;
uint8_t *buf, *buf_ptr;
};
diff --git a/xbmc/utils/JSONVariantParser.cpp b/xbmc/utils/JSONVariantParser.cpp
index 01067c1896..0790d53680 100644
--- a/xbmc/utils/JSONVariantParser.cpp
+++ b/xbmc/utils/JSONVariantParser.cpp
@@ -54,14 +54,11 @@ private:
Array,
Object
};
- PARSE_STATUS m_status;
+ PARSE_STATUS m_status = PARSE_STATUS::Variable;
};
CJSONVariantParserHandler::CJSONVariantParserHandler(CVariant& parsedObject)
- : m_parsedObject(parsedObject),
- m_parse(),
- m_key(),
- m_status(PARSE_STATUS::Variable)
+ : m_parsedObject(parsedObject), m_parse(), m_key()
{ }
bool CJSONVariantParserHandler::Null()
diff --git a/xbmc/utils/ScraperUrl.h b/xbmc/utils/ScraperUrl.h
index 9ff416a5dc..0ecf641909 100644
--- a/xbmc/utils/ScraperUrl.h
+++ b/xbmc/utils/ScraperUrl.h
@@ -29,20 +29,17 @@ public:
struct SUrlEntry
{
- explicit SUrlEntry(std::string url = "")
- : m_url(std::move(url)), m_type(UrlType::General), m_post(false), m_isgz(false), m_season(-1)
- {
- }
+ explicit SUrlEntry(std::string url = "") : m_url(std::move(url)) {}
std::string m_spoof;
std::string m_url;
std::string m_cache;
std::string m_aspect;
std::string m_preview;
- UrlType m_type;
- bool m_post;
- bool m_isgz;
- int m_season;
+ UrlType m_type = UrlType::General;
+ bool m_post = false;
+ bool m_isgz = false;
+ int m_season = -1;
};
CScraperUrl();
diff --git a/xbmc/utils/log.cpp b/xbmc/utils/log.cpp
index b0eb2bb8f9..24bd5072f6 100644
--- a/xbmc/utils/log.cpp
+++ b/xbmc/utils/log.cpp
@@ -38,9 +38,7 @@ CLog::CLog()
: m_platform(IPlatformLog::CreatePlatformLog()),
m_sinks(std::make_shared<spdlog::sinks::dist_sink_mt>()),
m_defaultLogger(CreateLogger("general")),
- m_logLevel(LOG_LEVEL_DEBUG),
- m_componentLogEnabled(false),
- m_componentLogLevels(0)
+ m_logLevel(LOG_LEVEL_DEBUG)
{
// add platform-specific debug sinks
m_platform->AddSinks(m_sinks);
diff --git a/xbmc/utils/log.h b/xbmc/utils/log.h
index 9fc4aae368..51ac11fd08 100644
--- a/xbmc/utils/log.h
+++ b/xbmc/utils/log.h
@@ -148,6 +148,6 @@ private:
int m_logLevel;
- bool m_componentLogEnabled;
- uint32_t m_componentLogLevels;
+ bool m_componentLogEnabled = false;
+ uint32_t m_componentLogLevels = 0;
};
diff --git a/xbmc/utils/test/TestJobManager.cpp b/xbmc/utils/test/TestJobManager.cpp
index 86f0af981c..0a4491e6dc 100644
--- a/xbmc/utils/test/TestJobManager.cpp
+++ b/xbmc/utils/test/TestJobManager.cpp
@@ -133,12 +133,7 @@ class BroadcastingJob :
public CJob
{
public:
-
- BroadcastingJob(JobControlPackage &package) :
- m_package(package),
- m_finish(false)
- {
- }
+ BroadcastingJob(JobControlPackage& package) : m_package(package) {}
void FinishAndStopBlocking()
{
@@ -176,7 +171,7 @@ private:
XbmcThreads::ConditionVariable m_block;
CCriticalSection m_blockMutex;
- bool m_finish;
+ bool m_finish = false;
};
BroadcastingJob *
diff --git a/xbmc/video/VideoInfoDownloader.cpp b/xbmc/video/VideoInfoDownloader.cpp
index b47f25cf6c..5d0fb1f1b7 100644
--- a/xbmc/video/VideoInfoDownloader.cpp
+++ b/xbmc/video/VideoInfoDownloader.cpp
@@ -22,8 +22,8 @@ using namespace std::chrono_literals;
#pragma warning (disable:4018)
#endif
-CVideoInfoDownloader::CVideoInfoDownloader(const ADDON::ScraperPtr &scraper) :
- CThread("VideoInfoDownloader"), m_state(DO_NOTHING), m_found(0), m_info(scraper)
+CVideoInfoDownloader::CVideoInfoDownloader(const ADDON::ScraperPtr& scraper)
+ : CThread("VideoInfoDownloader"), m_info(scraper)
{
m_http = new XFILE::CCurlFile;
}
diff --git a/xbmc/video/VideoInfoDownloader.h b/xbmc/video/VideoInfoDownloader.h
index 5a0f893ca9..a85603fe06 100644
--- a/xbmc/video/VideoInfoDownloader.h
+++ b/xbmc/video/VideoInfoDownloader.h
@@ -74,8 +74,8 @@ protected:
CVideoInfoTag m_movieDetails;
CScraperUrl m_url;
VIDEO::EPISODELIST m_episode;
- LOOKUP_STATE m_state;
- int m_found;
+ LOOKUP_STATE m_state = DO_NOTHING;
+ int m_found = 0;
ADDON::ScraperPtr m_info;
// threaded stuff
diff --git a/xbmc/windowing/android/VideoSyncAndroid.h b/xbmc/windowing/android/VideoSyncAndroid.h
index d7c26d2a94..c4722af7d3 100644
--- a/xbmc/windowing/android/VideoSyncAndroid.h
+++ b/xbmc/windowing/android/VideoSyncAndroid.h
@@ -14,7 +14,7 @@
class CVideoSyncAndroid : public CVideoSync, IDispResource
{
public:
- CVideoSyncAndroid(CVideoReferenceClock* clock) : CVideoSync(clock), m_LastVBlankTime(0) {}
+ CVideoSyncAndroid(CVideoReferenceClock* clock) : CVideoSync(clock) {}
// CVideoSync interface
bool Setup() override;
@@ -29,6 +29,7 @@ public:
void FrameCallback(int64_t frameTimeNanos);
private:
- int64_t m_LastVBlankTime; //timestamp of the last vblank, used for calculating how many vblanks happened
+ int64_t m_LastVBlankTime =
+ 0; //timestamp of the last vblank, used for calculating how many vblanks happened
CEvent m_abortEvent;
};
diff --git a/xbmc/windowing/osx/VideoSyncOsx.h b/xbmc/windowing/osx/VideoSyncOsx.h
index ea78624948..baa651da74 100644
--- a/xbmc/windowing/osx/VideoSyncOsx.h
+++ b/xbmc/windowing/osx/VideoSyncOsx.h
@@ -15,10 +15,7 @@
class CVideoSyncOsx : public CVideoSync, IDispResource
{
public:
- CVideoSyncOsx(CVideoReferenceClock* clock)
- : CVideoSync(clock), m_LastVBlankTime(0), m_displayLost(false), m_displayReset(false)
- {
- }
+ CVideoSyncOsx(CVideoReferenceClock* clock) : CVideoSync(clock) {}
// CVideoSync interface
bool Setup() override;
@@ -38,9 +35,10 @@ private:
virtual bool InitDisplayLink();
virtual void DeinitDisplayLink();
- int64_t m_LastVBlankTime; //timestamp of the last vblank, used for calculating how many vblanks happened
- volatile bool m_displayLost;
- volatile bool m_displayReset;
+ int64_t m_LastVBlankTime =
+ 0; //timestamp of the last vblank, used for calculating how many vblanks happened
+ volatile bool m_displayLost = false;
+ volatile bool m_displayReset = false;
CEvent m_lostEvent;
};
diff --git a/xbmc/windows/GUIWindowFileManager.cpp b/xbmc/windows/GUIWindowFileManager.cpp
index 627d127de2..54197390e4 100644
--- a/xbmc/windows/GUIWindowFileManager.cpp
+++ b/xbmc/windows/GUIWindowFileManager.cpp
@@ -86,8 +86,8 @@ namespace
class CGetDirectoryItems : public IRunnable
{
public:
- CGetDirectoryItems(XFILE::CVirtualDirectory &dir, CURL &url, CFileItemList &items)
- : m_result(false), m_dir(dir), m_url(url), m_items(items)
+ CGetDirectoryItems(XFILE::CVirtualDirectory& dir, CURL& url, CFileItemList& items)
+ : m_dir(dir), m_url(url), m_items(items)
{
}
void Run() override
@@ -98,7 +98,8 @@ public:
{
m_dir.CancelDirectory();
}
- bool m_result;
+ bool m_result = false;
+
protected:
XFILE::CVirtualDirectory &m_dir;
CURL m_url;