Fix a few warnings

This commit is contained in:
Léo Lam 2016-10-03 19:29:19 +02:00
parent e0bf9a1858
commit 04c1757b49
4 changed files with 6 additions and 8 deletions

View File

@ -138,7 +138,7 @@ void AdvancedConfigPane::OnClockOverrideSliderChanged(wxCommandEvent& event)
UpdateCPUClock();
}
u32 ToSeconds(wxDateTime date)
static u32 ToSeconds(wxDateTime date)
{
return static_cast<u32>(date.GetValue().GetValue() / 1000);
}

View File

@ -30,7 +30,7 @@
#include "DolphinWX/X11Utils.h"
#endif
static const std::array<std::string, 29> language_ids = {
static const std::array<std::string, 29> language_ids = {{
"",
"ms", "ca", "cs", "da", "de", "en", "es", "fr", "hr", "it", "hu", "nl",
@ -38,7 +38,7 @@ static const std::array<std::string, 29> language_ids = {
"pl", "pt", "pt_BR", "ro", "sr", "sv", "tr",
"el", "ru", "ar", "fa", "ko", "ja", "zh_CN", "zh_TW",
};
}};
InterfaceConfigPane::InterfaceConfigPane(wxWindow* parent, wxWindowID id) : wxPanel(parent, id)
{

View File

@ -345,7 +345,7 @@ wxString CRegTable::GetValue(int row, int col)
}
else
{
if (row - 32 < NUM_SPECIALS)
if (static_cast<size_t>(row - 32) < NUM_SPECIALS)
{
switch (col)
{
@ -386,7 +386,7 @@ void CRegTable::SetValue(int row, int col, const wxString& strNewVal)
}
else
{
if ((row - 32 < NUM_SPECIALS) && (col == 1))
if ((static_cast<size_t>(row - 32) < NUM_SPECIALS) && col == 1)
{
u32 new_val = 0;
if (TryParse("0x" + WxStrToStr(strNewVal), &new_val))
@ -407,7 +407,7 @@ void CRegTable::UpdateCachedRegs()
m_CachedFRegHasChanged[i][1] = (m_CachedFRegs[i][1] != riPS1(i));
m_CachedFRegs[i][1] = riPS1(i);
}
for (int i = 0; i < NUM_SPECIALS; ++i)
for (size_t i = 0; i < NUM_SPECIALS; ++i)
{
m_CachedSpecialRegHasChanged[i] = (m_CachedSpecialRegs[i] != GetSpecialRegValue(i));
m_CachedSpecialRegs[i] = GetSpecialRegValue(i);

View File

@ -121,7 +121,5 @@ private:
std::vector<SearchResult> search_results;
unsigned int m_search_result_idx;
wxButton* m_Close;
s32 m_FramesToRecord;
};