From 606e2f2802d8d4322ad08e1cda78075c7e1e7495 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 14 Sep 2013 07:44:01 -0700 Subject: [PATCH] Small warning fixes in Windows UI. --- Windows/Debugger/BreakpointWindow.cpp | 2 +- Windows/Debugger/CtrlMemView.cpp | 6 +++--- Windows/main.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Windows/Debugger/BreakpointWindow.cpp b/Windows/Debugger/BreakpointWindow.cpp index 3b325c3ad4..00fde68fef 100644 --- a/Windows/Debugger/BreakpointWindow.cpp +++ b/Windows/Debugger/BreakpointWindow.cpp @@ -173,7 +173,7 @@ bool BreakpointWindow::fetchDialogData(HWND hwnd) bool BreakpointWindow::exec() { bp = this; - bool result = (bool) DialogBoxParam(GetModuleHandle(0),MAKEINTRESOURCE(IDD_BREAKPOINT),parentHwnd,dlgFunc,(LPARAM)this); + bool result = DialogBoxParam(GetModuleHandle(0),MAKEINTRESOURCE(IDD_BREAKPOINT),parentHwnd,dlgFunc,(LPARAM)this) != 0; return result; } diff --git a/Windows/Debugger/CtrlMemView.cpp b/Windows/Debugger/CtrlMemView.cpp index d53d2c451d..9e10cd7313 100644 --- a/Windows/Debugger/CtrlMemView.cpp +++ b/Windows/Debugger/CtrlMemView.cpp @@ -600,13 +600,13 @@ void CtrlMemView::search(bool continueSearch) std::vector searchData; if (asciiSelected) { - for (int i = 0; i < searchQuery.length(); i++) + for (size_t i = 0; i < searchQuery.length(); i++) { char c = searchQuery[i]; searchData.push_back(c); } } else { - int index = 0; + size_t index = 0; while (index < searchQuery.size()) { if (searchQuery[index] == ' ' || searchQuery[index] == '\t') @@ -641,7 +641,7 @@ void CtrlMemView::search(bool continueSearch) searching = true; redraw(); // so the cursor is disabled - for (int i = 0; i < memoryAreas.size(); i++) + for (size_t i = 0; i < memoryAreas.size(); i++) { u32 segmentStart = memoryAreas[i].first; u32 segmentEnd = memoryAreas[i].second; diff --git a/Windows/main.cpp b/Windows/main.cpp index 6912c3f400..6af19d5e30 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -129,7 +129,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin // Really should find a way to do this in XP too :/ if (0 != GetLocaleInfo(LOCALE_NAME_USER_DEFAULT, LOCALE_SNAME, lcCountry, 256)) { langRegion = ConvertWStringToUTF8(lcCountry); - for (int i = 0; i < langRegion.size(); i++) { + for (size_t i = 0; i < langRegion.size(); i++) { if (langRegion[i] == '-') langRegion[i] = '_'; }