Merge pull request #622 from lioncash/initialization

Correct order of class initialization lists
This commit is contained in:
zilmar 2015-09-24 10:00:32 +10:00
commit 315027b7fb
18 changed files with 65 additions and 65 deletions

View File

@ -11,9 +11,9 @@
#include "stdafx.h"
CFlashram::CFlashram(bool ReadOnly):
m_FlashRamPointer(NULL),
m_FlashFlag(FLASHRAM_MODE_NOPES),
m_FlashStatus(0),
m_FlashRamPointer(NULL),
m_FlashRAM_Offset(0),
m_ReadOnly(ReadOnly),
m_hFile(NULL)

View File

@ -16,14 +16,12 @@ BYTE * CMipsMemoryVM::m_Reserve1 = NULL;
BYTE * CMipsMemoryVM::m_Reserve2 = NULL;
CMipsMemoryVM::CMipsMemoryVM( CMipsMemory_CallBack * CallBack, bool SavesReadOnly ) :
CPifRam(SavesReadOnly),
CFlashram(SavesReadOnly),
CSram(SavesReadOnly),
CDMA(*this,*this),
m_CBClass(CallBack),
m_TLB_ReadMap(NULL),
m_TLB_WriteMap(NULL),
m_RomMapped(false),
m_Rom(NULL),
m_RomSize(0),
@ -32,7 +30,9 @@ CMipsMemoryVM::CMipsMemoryVM( CMipsMemory_CallBack * CallBack, bool SavesReadOnl
m_HalfLine(0),
m_HalfLineCheck(false),
m_FieldSerration(0),
m_TempValue(0)
m_TempValue(0),
m_TLB_ReadMap(NULL),
m_TLB_WriteMap(NULL)
{
g_Settings->RegisterChangeCB(Game_RDRamSize,this,(CSettings::SettingChangedFunc)RdramChanged);
m_RDRAM = NULL;

View File

@ -11,8 +11,8 @@
#include "stdafx.h"
CSram::CSram ( bool ReadOnly ) :
m_hFile(NULL),
m_ReadOnly(ReadOnly)
m_ReadOnly(ReadOnly),
m_hFile(NULL)
{
}

View File

@ -11,9 +11,9 @@
#include "stdafx.h"
CSystemEvents::CSystemEvents(CN64System * System, CPlugins * Plugins) :
m_bDoSomething(false),
m_System(System),
m_Plugins(Plugins)
m_Plugins(Plugins),
m_bDoSomething(false)
{
}

View File

@ -17,33 +17,33 @@
CN64System::CN64System ( CPlugins * Plugins, bool SavesReadOnly ) :
CSystemEvents(this, Plugins),
m_Cheats(NULL),
m_EndEmulation(false),
m_SaveUsing((SAVE_CHIP_TYPE)g_Settings->LoadDword(Game_SaveChip)),
m_Plugins(Plugins),
m_SyncCPU(NULL),
m_SyncPlugins(NULL),
m_SyncWindow(NULL),
m_Reg(this,this),
m_MMU_VM(this,SavesReadOnly),
m_TLB(this),
m_Reg(this,this),
m_FPS(g_Notify),
m_Plugins(Plugins),
m_Cheats(NULL),
m_SyncCPU(NULL),
m_Recomp(NULL),
m_InReset(false),
m_EndEmulation(false),
m_bCleanFrameBox(true),
m_bInitialized(false),
m_NextTimer(0),
m_SystemTimer(m_NextTimer),
m_bCleanFrameBox(true),
m_bInitialized(false),
m_RspBroke(true),
m_DMAUsed(false),
m_CPU_Handle(NULL),
m_CPU_ThreadID(0),
m_TestTimer(false),
m_NextInstruction(0),
m_JumpToLocation(0),
m_TLBLoadAddress(0),
m_TLBStoreAddress(0),
m_SaveUsing((SAVE_CHIP_TYPE)g_Settings->LoadDword(Game_SaveChip)),
m_RspBroke(true),
m_SyncCount(0)
m_SyncCount(0),
m_CPU_Handle(NULL),
m_CPU_ThreadID(0)
{
DWORD gameHertz = g_Settings->LoadDword(Game_ScreenHertz);
if (gameHertz == 0)

View File

@ -17,8 +17,8 @@ CCodeBlock::CCodeBlock(DWORD VAddrEnter, BYTE * RecompPos) :
m_VAddrFirst(VAddrEnter),
m_VAddrLast(VAddrEnter),
m_CompiledLocation(RecompPos),
m_Test(1),
m_EnterSection(NULL)
m_EnterSection(NULL),
m_Test(1)
{
CCodeSection * baseSection = new CCodeSection(this, VAddrEnter, 0, false);
if (baseSection == NULL)

View File

@ -88,17 +88,17 @@ static bool DelaySlotEffectsJump(DWORD JumpPC) {
CCodeSection::CCodeSection( CCodeBlock * CodeBlock, DWORD EnterPC, DWORD ID, bool LinkAllowed) :
m_BlockInfo(CodeBlock),
m_SectionID(ID),
m_EnterPC(EnterPC),
m_EndPC((DWORD)-1),
m_SectionID(ID),
m_ContinueSection(NULL),
m_JumpSection(NULL),
m_EndSection(false),
m_LinkAllowed(LinkAllowed),
m_CompiledLocation(NULL),
m_Test(0),
m_Test2(0),
m_CompiledLocation(NULL),
m_InLoop(false),
m_EndSection(false),
m_DelaySlot(false)
{
CPU_Message(__FUNCTION__ ": ID %d EnterPC 0x%08X",ID,EnterPC);

View File

@ -14,8 +14,8 @@ CCompiledFunc::CCompiledFunc( const CCodeBlock & CodeBlock ) :
m_EnterPC(CodeBlock.VAddrEnter()),
m_MinPC(CodeBlock.VAddrFirst()),
m_MaxPC(CodeBlock.VAddrLast()),
m_Function((Func)CodeBlock.CompiledLocation()),
m_Hash(CodeBlock.Hash()),
m_Function((Func)CodeBlock.CompiledLocation()),
m_Next(NULL)
{
m_MemContents[0] = CodeBlock.MemContents(0);

View File

@ -13,8 +13,8 @@
CRecompiler::CRecompiler(CRegisters & Registers, CProfiling & Profile, bool & EndEmulation ) :
m_Registers(Registers),
m_Profile(Profile),
PROGRAM_COUNTER(Registers.m_PROGRAM_COUNTER),
m_EndEmulation(EndEmulation)
m_EndEmulation(EndEmulation),
PROGRAM_COUNTER(Registers.m_PROGRAM_COUNTER)
{
if (g_MMU != NULL)
{

View File

@ -11,12 +11,12 @@
#include "stdafx.h"
CAudioPlugin::CAudioPlugin() :
m_hAudioThread(NULL),
AiDacrateChanged(NULL),
AiLenChanged(NULL),
AiReadLength(NULL),
ProcessAList(NULL),
AiUpdate(NULL)
m_hAudioThread(NULL),
AiUpdate(NULL),
AiDacrateChanged(NULL)
{
}

View File

@ -11,13 +11,13 @@
#include "stdafx.h"
CControl_Plugin::CControl_Plugin(void) :
m_AllocatedControllers(false),
WM_KeyDown(NULL),
WM_KeyUp(NULL),
RumbleCommand(NULL),
GetKeys(NULL),
ReadController(NULL),
ControllerCommand(NULL)
ControllerCommand(NULL),
m_AllocatedControllers(false)
{
memset(&m_PluginControllers, 0, sizeof(m_PluginControllers));
memset(&m_Controllers, 0, sizeof(m_Controllers));

View File

@ -11,18 +11,18 @@
#include "stdafx.h"
CPlugin::CPlugin() :
m_hDll(NULL),
m_Initialized(false),
m_RomOpen(false),
RomOpen(NULL),
RomClosed(NULL),
CloseDLL(NULL),
PluginOpened(NULL),
DllAbout(NULL),
DllConfig(NULL),
CloseDLL(NULL),
RomOpen(NULL),
RomClosed(NULL),
PluginOpened(NULL),
SetSettingInfo(NULL),
SetSettingInfo2(NULL),
SetSettingInfo3(NULL)
SetSettingInfo3(NULL),
m_hDll(NULL),
m_Initialized(false),
m_RomOpen(false)
{
memset(&m_PluginInfo, 0, sizeof(m_PluginInfo));
}

View File

@ -11,9 +11,9 @@
#include "stdafx.h"
CPlugins::CPlugins (const stdstr & PluginDir):
m_PluginDir(PluginDir),
m_Gfx(NULL), m_Audio(NULL), m_RSP(NULL), m_Control(NULL),
m_RenderWindow(NULL), m_DummyWindow(NULL)
m_RenderWindow(NULL), m_DummyWindow(NULL),
m_PluginDir(PluginDir), m_Gfx(NULL), m_Audio(NULL),
m_RSP(NULL), m_Control(NULL)
{
CreatePlugins();
g_Settings->RegisterChangeCB(Plugin_RSP_Current,this,(CSettings::SettingChangedFunc)PluginChanged);

View File

@ -15,9 +15,9 @@ void DummyFunc1(BOOL /*a*/) {}
CRSP_Plugin::CRSP_Plugin(void) :
DoRspCycles(NULL),
EnableDebugging(NULL),
m_CycleCount(0),
GetDebugInfo(NULL),
InitiateDebugger(NULL),
m_CycleCount(0)
InitiateDebugger(NULL)
{
memset(&m_RSPDebug, 0, sizeof(m_RSPDebug));
}

View File

@ -15,41 +15,41 @@ bool CSettingTypeApplication::m_UseRegistry = false;
CIniFile * CSettingTypeApplication::m_SettingsIniFile = NULL;
CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, DWORD DefaultValue ) :
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_DefaultStr(""),
m_DefaultValue(DefaultValue),
m_DefaultSetting(Default_Constant),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName)
{
}
CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, bool DefaultValue ) :
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_DefaultStr(""),
m_DefaultValue(DefaultValue),
m_DefaultSetting(Default_Constant),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName)
{
}
CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, LPCSTR DefaultValue ) :
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_DefaultStr(DefaultValue),
m_DefaultValue(0),
m_DefaultSetting(Default_Constant),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName)
{
}
CSettingTypeApplication::CSettingTypeApplication(LPCSTR Section, LPCSTR Name, SettingID DefaultSetting ) :
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_DefaultStr(""),
m_DefaultValue(0),
m_DefaultSetting(DefaultSetting),
m_Section(FixSectionName(Section)),
m_KeyName(Name),
m_KeyNameIdex(m_KeyName)
{
}

View File

@ -7,10 +7,10 @@ CNotification & Notify ( void )
return g_Notify;
}
CNotification::CNotification ( ) :
m_NextMsg(0),
CNotification::CNotification() :
m_hWnd(NULL),
m_gfxPlugin(NULL),
m_hWnd(NULL)
m_NextMsg(0)
{
_tzset();
}

View File

@ -6,14 +6,14 @@
CRomBrowser::CRomBrowser (HWND & MainWindow, HWND & StatusWindow ) :
m_MainWindow(MainWindow),
m_StatusWindow(StatusWindow),
m_ShowingRomBrowser(false),
m_RefreshThread(NULL),
m_RomIniFile(NULL),
m_NotesIniFile(NULL),
m_ExtIniFile(NULL),
m_ZipIniFile(NULL),
m_WatchThreadID(0),
m_ShowingRomBrowser(false),
m_AllowSelectionLastRom(true)
m_AllowSelectionLastRom(true),
m_WatchThreadID(0)
{
if (g_Settings)
{

View File

@ -19,14 +19,14 @@ class CModifiedComboBoxT :
public:
// Constructors
CModifiedComboBoxT(TParam defaultValue, HWND hWnd = NULL, bool AllwaysSelected = true) :
CComboBox(hWnd),
m_defaultValue(defaultValue),
m_AllwaysSelected(AllwaysSelected),
CComboBox(hWnd),
m_Changed(false),
m_Reset(false),
m_defaultValue(defaultValue),
m_BoldFont(NULL),
m_OriginalFont(NULL),
m_TextField(NULL)
m_TextField(NULL),
m_AllwaysSelected(AllwaysSelected)
{
}