From 7c5ab082d3356921cf6bfcd10cef9b9334a7aad0 Mon Sep 17 00:00:00 2001 From: Garrett Brown Date: Sun, 30 Aug 2020 20:25:27 -0700 Subject: [PATCH] Fix compiler warning with clang due to PR 120 Warning was: GUIDialogSelect.cpp:30:5: warning: field 'm_buttonLabel' will be initialized after field 'm_selectedItem' [-Wreorder] m_buttonLabel(-1), ^ --- xbmc/dialogs/GUIDialogSelect.cpp | 7 ------- xbmc/dialogs/GUIDialogSelect.h | 10 +++++----- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/xbmc/dialogs/GUIDialogSelect.cpp b/xbmc/dialogs/GUIDialogSelect.cpp index 7fba294a5e86a..3975b3f8c7388 100644 --- a/xbmc/dialogs/GUIDialogSelect.cpp +++ b/xbmc/dialogs/GUIDialogSelect.cpp @@ -25,13 +25,6 @@ CGUIDialogSelect::CGUIDialogSelect() : CGUIDialogSelect(WINDOW_DIALOG_SELECT) {} CGUIDialogSelect::CGUIDialogSelect(int windowId) : CGUIDialogBoxBase(windowId, "DialogSelect.xml"), - m_bButtonEnabled(false), - m_bButtonPressed(false), - m_buttonLabel(-1), - m_selectedItem(nullptr), - m_useDetails(false), - m_multiSelection(false), - m_selectedItems(), m_vecList(new CFileItemList()) { m_bConfirmed = false; diff --git a/xbmc/dialogs/GUIDialogSelect.h b/xbmc/dialogs/GUIDialogSelect.h index 3fda1d58f18ad..9c8b60a13e122 100644 --- a/xbmc/dialogs/GUIDialogSelect.h +++ b/xbmc/dialogs/GUIDialogSelect.h @@ -58,11 +58,11 @@ class CGUIDialogSelect : public CGUIDialogBoxBase CFileItemPtr m_selectedItem; private: - bool m_bButtonEnabled; - bool m_bButtonPressed; - int m_buttonLabel; - bool m_useDetails; - bool m_multiSelection; + bool m_bButtonEnabled = false; + bool m_bButtonPressed = false; + int m_buttonLabel = -1; + bool m_useDetails = false; + bool m_multiSelection = false; bool m_focusToButton{}; std::vector m_selectedItems;