mirror of https://github.com/PCSX2/pcsx2.git
GUI-Wx: Fix variable initializations.
Codacy Warning: Variable 'variable' is assigned in constructor body. Consider performing initialization in initialization list.
This commit is contained in:
parent
ab430355ec
commit
98724979cb
|
@ -557,8 +557,8 @@ AppConfig::AppConfig()
|
||||||
, McdSettingsTabName(L"none")
|
, McdSettingsTabName(L"none")
|
||||||
, AppSettingsTabName(L"none")
|
, AppSettingsTabName(L"none")
|
||||||
, GameDatabaseTabName(L"none")
|
, GameDatabaseTabName(L"none")
|
||||||
|
, LanguageId(wxLANGUAGE_DEFAULT)
|
||||||
{
|
{
|
||||||
LanguageId = wxLANGUAGE_DEFAULT;
|
|
||||||
LanguageCode = L"default";
|
LanguageCode = L"default";
|
||||||
RecentIsoCount = 20;
|
RecentIsoCount = 20;
|
||||||
Listbook_ImageSize = 32;
|
Listbook_ImageSize = 32;
|
||||||
|
@ -827,6 +827,8 @@ void AppSetEmuFolders()
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
AppConfig::GSWindowOptions::GSWindowOptions()
|
AppConfig::GSWindowOptions::GSWindowOptions()
|
||||||
|
: WindowSize(wxSize(640, 480))
|
||||||
|
, WindowPos(wxDefaultPosition)
|
||||||
{
|
{
|
||||||
CloseOnEsc = true;
|
CloseOnEsc = true;
|
||||||
DefaultToFullscreen = false;
|
DefaultToFullscreen = false;
|
||||||
|
@ -834,8 +836,6 @@ AppConfig::GSWindowOptions::GSWindowOptions()
|
||||||
DisableResizeBorders = false;
|
DisableResizeBorders = false;
|
||||||
DisableScreenSaver = true;
|
DisableScreenSaver = true;
|
||||||
|
|
||||||
WindowSize = wxSize(640, 480);
|
|
||||||
WindowPos = wxDefaultPosition;
|
|
||||||
IsMaximized = false;
|
IsMaximized = false;
|
||||||
IsFullscreen = false;
|
IsFullscreen = false;
|
||||||
EnableVsyncWindowFlag = false;
|
EnableVsyncWindowFlag = false;
|
||||||
|
@ -934,18 +934,18 @@ void AppConfig::CaptureOptions::LoadSave(IniInterface& ini)
|
||||||
}
|
}
|
||||||
|
|
||||||
AppConfig::UiTemplateOptions::UiTemplateOptions()
|
AppConfig::UiTemplateOptions::UiTemplateOptions()
|
||||||
|
: LimiterUnlimited(L"Max")
|
||||||
|
, LimiterTurbo(L"Turbo")
|
||||||
|
, LimiterSlowmo(L"Slowmo")
|
||||||
|
, LimiterNormal(L"Normal")
|
||||||
|
, OutputFrame(L"Frame")
|
||||||
|
, OutputField(L"Field")
|
||||||
|
, OutputProgressive(L"Progressive")
|
||||||
|
, OutputInterlaced(L"Interlaced")
|
||||||
|
, Paused(L"<PAUSED> ")
|
||||||
|
, TitleTemplate(L"Slot: ${slot} | Speed: ${speed} (${vfps}) | ${videomode} | Limiter: ${limiter} | ${gs} | ${omodei} | ${cpuusage}")
|
||||||
|
, RecordingTemplate(L"Slot: ${slot} | Frame: ${frame}/${maxFrame} | Rec. Mode: ${mode} | Speed: ${speed} (${vfps}) | Limiter: ${limiter}")
|
||||||
{
|
{
|
||||||
LimiterUnlimited = L"Max";
|
|
||||||
LimiterTurbo = L"Turbo";
|
|
||||||
LimiterSlowmo = L"Slowmo";
|
|
||||||
LimiterNormal = L"Normal";
|
|
||||||
OutputFrame = L"Frame";
|
|
||||||
OutputField = L"Field";
|
|
||||||
OutputProgressive = L"Progressive";
|
|
||||||
OutputInterlaced = L"Interlaced";
|
|
||||||
Paused = L"<PAUSED> ";
|
|
||||||
TitleTemplate = L"Slot: ${slot} | Speed: ${speed} (${vfps}) | ${videomode} | Limiter: ${limiter} | ${gs} | ${omodei} | ${cpuusage}";
|
|
||||||
RecordingTemplate = L"Slot: ${slot} | Frame: ${frame}/${maxFrame} | Rec. Mode: ${mode} | Speed: ${speed} (${vfps}) | Limiter: ${limiter}";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppConfig::UiTemplateOptions::LoadSave(IniInterface& ini)
|
void AppConfig::UiTemplateOptions::LoadSave(IniInterface& ini)
|
||||||
|
|
|
@ -112,8 +112,8 @@ static void PostCoreStatus(CoreThreadStatus pevt)
|
||||||
// --------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------
|
||||||
AppCoreThread::AppCoreThread()
|
AppCoreThread::AppCoreThread()
|
||||||
: SysCoreThread()
|
: SysCoreThread()
|
||||||
|
, m_resetCdvd(false)
|
||||||
{
|
{
|
||||||
m_resetCdvd = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AppCoreThread::~AppCoreThread()
|
AppCoreThread::~AppCoreThread()
|
||||||
|
|
|
@ -677,6 +677,10 @@ protected:
|
||||||
|
|
||||||
Pcsx2App::Pcsx2App()
|
Pcsx2App::Pcsx2App()
|
||||||
: SysExecutorThread(new SysEvtHandler())
|
: SysExecutorThread(new SysEvtHandler())
|
||||||
|
, m_id_MainFrame(wxID_ANY)
|
||||||
|
, m_id_GsFrame(wxID_ANY)
|
||||||
|
, m_id_ProgramLogBox(wxID_ANY)
|
||||||
|
, m_id_Disassembler(wxID_ANY)
|
||||||
{
|
{
|
||||||
// Warning: Do not delete this comment block! Gettext will parse it to allow
|
// Warning: Do not delete this comment block! Gettext will parse it to allow
|
||||||
// the translation of some wxWidget internal strings. -- greg
|
// the translation of some wxWidget internal strings. -- greg
|
||||||
|
@ -717,10 +721,6 @@ Pcsx2App::Pcsx2App()
|
||||||
m_UseGUI = true;
|
m_UseGUI = true;
|
||||||
m_NoGuiExitPrompt = true;
|
m_NoGuiExitPrompt = true;
|
||||||
|
|
||||||
m_id_MainFrame = wxID_ANY;
|
|
||||||
m_id_GsFrame = wxID_ANY;
|
|
||||||
m_id_ProgramLogBox = wxID_ANY;
|
|
||||||
m_id_Disassembler = wxID_ANY;
|
|
||||||
m_ptr_ProgramLog = NULL;
|
m_ptr_ProgramLog = NULL;
|
||||||
|
|
||||||
SetAppName(L"PCSX2");
|
SetAppName(L"PCSX2");
|
||||||
|
|
|
@ -387,13 +387,13 @@ ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, A
|
||||||
, m_timer_FlushUnlocker( this )
|
, m_timer_FlushUnlocker( this )
|
||||||
, m_ColorTable( options.FontSize )
|
, m_ColorTable( options.FontSize )
|
||||||
|
|
||||||
|
, m_pendingFlushMsg(false)
|
||||||
|
, m_WaitingThreadsForFlush(0)
|
||||||
, m_QueueColorSection( "ConsoleLog::QueueColorSection" )
|
, m_QueueColorSection( "ConsoleLog::QueueColorSection" )
|
||||||
, m_QueueBuffer( "ConsoleLog::QueueBuffer" )
|
, m_QueueBuffer( "ConsoleLog::QueueBuffer" )
|
||||||
, m_threadlogger( EnableThreadedLoggingTest ? new ConsoleTestThread() : NULL )
|
, m_threadlogger( EnableThreadedLoggingTest ? new ConsoleTestThread() : NULL )
|
||||||
{
|
{
|
||||||
m_CurQueuePos = 0;
|
m_CurQueuePos = 0;
|
||||||
m_WaitingThreadsForFlush = 0;
|
|
||||||
m_pendingFlushMsg = false;
|
|
||||||
m_FlushRefreshLocked = false;
|
m_FlushRefreshLocked = false;
|
||||||
|
|
||||||
// create Log menu (contains most options)
|
// create Log menu (contains most options)
|
||||||
|
|
|
@ -41,8 +41,8 @@ protected:
|
||||||
public:
|
public:
|
||||||
DroppedTooManyFiles( const wxWindow* window )
|
DroppedTooManyFiles( const wxWindow* window )
|
||||||
: pxActionEvent()
|
: pxActionEvent()
|
||||||
|
, m_ownerid(window->GetId())
|
||||||
{
|
{
|
||||||
m_ownerid = window->GetId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~DroppedTooManyFiles() = default;
|
virtual ~DroppedTooManyFiles() = default;
|
||||||
|
@ -70,8 +70,8 @@ protected:
|
||||||
public:
|
public:
|
||||||
DroppedElf( const wxWindow* window )
|
DroppedElf( const wxWindow* window )
|
||||||
: pxActionEvent()
|
: pxActionEvent()
|
||||||
|
, m_ownerid(window->GetId())
|
||||||
{
|
{
|
||||||
m_ownerid = window->GetId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~DroppedElf() = default;
|
virtual ~DroppedElf() = default;
|
||||||
|
@ -118,9 +118,9 @@ protected:
|
||||||
public:
|
public:
|
||||||
DroppedIso( const wxWindow* window, const wxString& filename )
|
DroppedIso( const wxWindow* window, const wxString& filename )
|
||||||
: pxActionEvent()
|
: pxActionEvent()
|
||||||
|
, m_ownerid(window->GetId())
|
||||||
, m_filename(filename)
|
, m_filename(filename)
|
||||||
{
|
{
|
||||||
m_ownerid = window->GetId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~DroppedIso() = default;
|
virtual ~DroppedIso() = default;
|
||||||
|
|
|
@ -64,14 +64,13 @@ namespace PINESettings
|
||||||
// --------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------
|
||||||
|
|
||||||
SysCoreThread::SysCoreThread()
|
SysCoreThread::SysCoreThread()
|
||||||
|
: m_hasActiveMachine(false)
|
||||||
{
|
{
|
||||||
m_name = L"EE Core";
|
m_name = L"EE Core";
|
||||||
m_resetRecompilers = true;
|
m_resetRecompilers = true;
|
||||||
m_resetProfilers = true;
|
m_resetProfilers = true;
|
||||||
m_resetVsyncTimers = true;
|
m_resetVsyncTimers = true;
|
||||||
m_resetVirtualMachine = true;
|
m_resetVirtualMachine = true;
|
||||||
|
|
||||||
m_hasActiveMachine = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SysCoreThread::~SysCoreThread()
|
SysCoreThread::~SysCoreThread()
|
||||||
|
|
|
@ -50,9 +50,8 @@ static wxString i18n_GetBetterLanguageName( const wxLanguageInfo* info )
|
||||||
}
|
}
|
||||||
|
|
||||||
LangPackEnumeration::LangPackEnumeration( wxLanguage langId )
|
LangPackEnumeration::LangPackEnumeration( wxLanguage langId )
|
||||||
|
: wxLangId(langId)
|
||||||
{
|
{
|
||||||
wxLangId = langId;
|
|
||||||
|
|
||||||
if (const wxLanguageInfo* info = wxLocale::GetLanguageInfo( wxLangId ))
|
if (const wxLanguageInfo* info = wxLocale::GetLanguageInfo( wxLangId ))
|
||||||
{
|
{
|
||||||
canonicalName = info->CanonicalName;
|
canonicalName = info->CanonicalName;
|
||||||
|
@ -61,12 +60,10 @@ LangPackEnumeration::LangPackEnumeration( wxLanguage langId )
|
||||||
}
|
}
|
||||||
|
|
||||||
LangPackEnumeration::LangPackEnumeration()
|
LangPackEnumeration::LangPackEnumeration()
|
||||||
|
: wxLangId(wxLANGUAGE_DEFAULT)
|
||||||
|
, canonicalName(L"default")
|
||||||
|
, englishName(L"System Default" + _(" (default)"))
|
||||||
{
|
{
|
||||||
wxLangId = wxLANGUAGE_DEFAULT;
|
|
||||||
englishName = L"System Default";
|
|
||||||
englishName += _(" (default)");
|
|
||||||
canonicalName = L"default";
|
|
||||||
|
|
||||||
int sysLang = wxLocale::GetSystemLanguage();
|
int sysLang = wxLocale::GetSystemLanguage();
|
||||||
|
|
||||||
if (sysLang == wxLANGUAGE_UNKNOWN)
|
if (sysLang == wxLANGUAGE_UNKNOWN)
|
||||||
|
|
Loading…
Reference in New Issue