Frame: In-class initialise member variables

This commit is contained in:
Léo Lam 2016-09-25 19:02:10 +02:00
parent 5d00915d37
commit a9ad83cec0
2 changed files with 24 additions and 29 deletions

View File

@ -386,13 +386,8 @@ static BOOL WINAPI s_ctrl_handler(DWORD fdwCtrlType)
CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos, CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos,
const wxSize& size, bool _UseDebugger, bool _BatchMode, bool ShowLogWindow, const wxSize& size, bool _UseDebugger, bool _BatchMode, bool ShowLogWindow,
long style) long style)
: CRenderFrame(parent, id, title, pos, size, style), g_pCodeWindow(nullptr), : CRenderFrame(parent, id, title, pos, size, style), UseDebugger(_UseDebugger),
g_NetPlaySetupDiag(nullptr), g_CheatsWindow(nullptr), m_SavedPerspectives(nullptr), m_bBatchMode(_BatchMode)
m_ToolBar(nullptr), m_GameListCtrl(nullptr), m_Panel(nullptr), m_RenderFrame(nullptr),
m_RenderParent(nullptr), m_LogWindow(nullptr), m_LogConfigWindow(nullptr),
m_FifoPlayerDlg(nullptr), UseDebugger(_UseDebugger), m_bBatchMode(_BatchMode), m_bEdit(false),
m_bTabSplit(false), m_bNoDocking(false), m_bGameLoading(false), m_bClosing(false),
m_confirmStop(false), m_menubar_shadow(nullptr)
{ {
for (int i = 0; i <= IDM_CODE_WINDOW - IDM_LOG_WINDOW; i++) for (int i = 0; i <= IDM_CODE_WINDOW - IDM_LOG_WINDOW; i++)
bFloatWindow[i] = false; bFloatWindow[i] = false;

View File

@ -79,9 +79,9 @@ public:
} }
// These have to be public // These have to be public
CCodeWindow* g_pCodeWindow; CCodeWindow* g_pCodeWindow = nullptr;
NetPlaySetupFrame* g_NetPlaySetupDiag; NetPlaySetupFrame* g_NetPlaySetupDiag = nullptr;
wxCheatsWindow* g_CheatsWindow; wxCheatsWindow* g_CheatsWindow = nullptr;
TASInputDlg* g_TASInputDlg[8]; TASInputDlg* g_TASInputDlg[8];
void InitBitmaps(); void InitBitmaps();
@ -123,11 +123,11 @@ public:
X11Utils::XRRConfiguration* m_XRRConfig; X11Utils::XRRConfiguration* m_XRRConfig;
#endif #endif
wxMenu* m_SavedPerspectives; wxMenu* m_SavedPerspectives = nullptr;
wxToolBar* m_ToolBar; wxToolBar* m_ToolBar = nullptr;
// AUI // AUI
wxAuiManager* m_Mgr; wxAuiManager* m_Mgr = nullptr;
bool bFloatWindow[IDM_CODE_WINDOW - IDM_LOG_WINDOW + 1]; bool bFloatWindow[IDM_CODE_WINDOW - IDM_LOG_WINDOW + 1];
// Perspectives (Should find a way to make all of this private) // Perspectives (Should find a way to make all of this private)
@ -143,21 +143,21 @@ public:
u32 ActivePerspective; u32 ActivePerspective;
private: private:
CGameListCtrl* m_GameListCtrl; CGameListCtrl* m_GameListCtrl = nullptr;
wxPanel* m_Panel; wxPanel* m_Panel = nullptr;
CRenderFrame* m_RenderFrame; CRenderFrame* m_RenderFrame = nullptr;
wxWindow* m_RenderParent; wxWindow* m_RenderParent = nullptr;
CLogWindow* m_LogWindow; CLogWindow* m_LogWindow = nullptr;
LogConfigWindow* m_LogConfigWindow; LogConfigWindow* m_LogConfigWindow = nullptr;
FifoPlayerDlg* m_FifoPlayerDlg; FifoPlayerDlg* m_FifoPlayerDlg = nullptr;
bool UseDebugger; bool UseDebugger = false;
bool m_bBatchMode; bool m_bBatchMode = false;
bool m_bEdit; bool m_bEdit = false;
bool m_bTabSplit; bool m_bTabSplit = false;
bool m_bNoDocking; bool m_bNoDocking = false;
bool m_bGameLoading; bool m_bGameLoading = false;
bool m_bClosing; bool m_bClosing = false;
bool m_confirmStop; bool m_confirmStop = false;
int m_saveSlot = 1; int m_saveSlot = 1;
std::vector<std::string> drives; std::vector<std::string> drives;
@ -191,7 +191,7 @@ private:
wxBitmap m_Bitmaps[EToolbar_Max]; wxBitmap m_Bitmaps[EToolbar_Max];
wxMenuBar* m_menubar_shadow; wxMenuBar* m_menubar_shadow = nullptr;
void PopulateToolbar(wxToolBar* toolBar); void PopulateToolbar(wxToolBar* toolBar);
void RecreateToolbar(); void RecreateToolbar();