diff --git a/Source/Core/Core/FifoPlayer/FifoDataFile.h b/Source/Core/Core/FifoPlayer/FifoDataFile.h index bddd5469c0..6d35ea094f 100644 --- a/Source/Core/Core/FifoPlayer/FifoDataFile.h +++ b/Source/Core/Core/FifoPlayer/FifoDataFile.h @@ -64,8 +64,8 @@ public: u32 *GetXFRegs() { return m_XFRegs; } void AddFrame(const FifoFrameInfo &frameInfo); - const FifoFrameInfo &GetFrame(int frame) const { return m_Frames[frame]; } - int GetFrameCount() { return (int)m_Frames.size(); } + const FifoFrameInfo &GetFrame(size_t frame) const { return m_Frames[frame]; } + size_t GetFrameCount() { return m_Frames.size(); } bool Save(const char *filename); diff --git a/Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp b/Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp index e6adc14130..81a647286c 100644 --- a/Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp +++ b/Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp @@ -49,7 +49,7 @@ void FifoPlaybackAnalyzer::AnalyzeFrames(FifoDataFile *file, std::vectorGetFrameCount()); - for (int frameIdx = 0; frameIdx < file->GetFrameCount(); ++frameIdx) + for (size_t frameIdx = 0; frameIdx < file->GetFrameCount(); ++frameIdx) { const FifoFrameInfo& frame = file->GetFrame(frameIdx); AnalyzedFrameInfo& analyzed = frameInfo[frameIdx]; diff --git a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp index 8aaf962999..25c6c9064a 100644 --- a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp +++ b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp @@ -260,7 +260,7 @@ void FifoPlayer::WriteAllMemoryUpdates() { _assert_(m_File); - for (int frameNum = 0; frameNum < m_File->GetFrameCount(); ++frameNum) + for (size_t frameNum = 0; frameNum < m_File->GetFrameCount(); ++frameNum) { const FifoFrameInfo &frame = m_File->GetFrame(frameNum); for (auto& update : frame.memoryUpdates) diff --git a/Source/Core/DolphinWX/FifoPlayerDlg.cpp b/Source/Core/DolphinWX/FifoPlayerDlg.cpp index 5e3c7b0451..cf8d7baad6 100644 --- a/Source/Core/DolphinWX/FifoPlayerDlg.cpp +++ b/Source/Core/DolphinWX/FifoPlayerDlg.cpp @@ -845,12 +845,12 @@ void FifoPlayerDlg::UpdateAnalyzerGui() FifoPlayer &player = FifoPlayer::GetInstance(); FifoDataFile* file = player.GetFile(); - int num_frames = (file) ? player.GetFile()->GetFrameCount() : 0; - if ((int)m_framesList->GetCount() != num_frames) + size_t num_frames = (file) ? player.GetFile()->GetFrameCount() : 0U; + if (m_framesList->GetCount() != num_frames) { m_framesList->Clear(); - for (int i = 0; i < num_frames; ++i) + for (size_t i = 0; i < num_frames; ++i) { m_framesList->Append(wxString::Format(wxT("Frame %i"), i)); } @@ -897,8 +897,8 @@ wxString FifoPlayerDlg::CreateRecordingFifoSizeLabel() const if (file) { - int fifoBytes = 0; - for (int i = 0; i < file->GetFrameCount(); ++i) + size_t fifoBytes = 0; + for (size_t i = 0; i < file->GetFrameCount(); ++i) fifoBytes += file->GetFrame(i).fifoDataSize; return CreateIntegerLabel(fifoBytes, _("FIFO Byte")); @@ -913,8 +913,8 @@ wxString FifoPlayerDlg::CreateRecordingMemSizeLabel() const if (file) { - int memBytes = 0; - for (int frameNum = 0; frameNum < file->GetFrameCount(); ++frameNum) + size_t memBytes = 0; + for (size_t frameNum = 0; frameNum < file->GetFrameCount(); ++frameNum) { const vector& memUpdates = file->GetFrame(frameNum).memoryUpdates; for (auto& memUpdate : memUpdates) @@ -933,20 +933,20 @@ wxString FifoPlayerDlg::CreateRecordingFrameCountLabel() const if (file) { - int numFrames = file->GetFrameCount(); + size_t numFrames = file->GetFrameCount(); return CreateIntegerLabel(numFrames, _("Frame")); } return wxEmptyString; } -wxString FifoPlayerDlg::CreateIntegerLabel(int size, const wxString& label) const +wxString FifoPlayerDlg::CreateIntegerLabel(size_t size, const wxString& label) const { wxString postfix; if (size != 1) postfix = _("s"); - return wxString::Format(wxT("%i"), size) + wxT(" ") + label + postfix; + return wxString::Format(wxT("%u"), size) + wxT(" ") + label + postfix; } bool FifoPlayerDlg::GetSaveButtonEnabled() const diff --git a/Source/Core/DolphinWX/FifoPlayerDlg.h b/Source/Core/DolphinWX/FifoPlayerDlg.h index 774991b2d9..84675432f2 100644 --- a/Source/Core/DolphinWX/FifoPlayerDlg.h +++ b/Source/Core/DolphinWX/FifoPlayerDlg.h @@ -56,7 +56,7 @@ private: wxString CreateRecordingFifoSizeLabel() const; wxString CreateRecordingMemSizeLabel() const; wxString CreateRecordingFrameCountLabel() const; - wxString CreateIntegerLabel(int size, const wxString& label) const; + wxString CreateIntegerLabel(size_t size, const wxString& label) const; bool GetSaveButtonEnabled() const;