Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginClass.cpp

Issue 11449051: Fix 64-bit conversion errors (Closed)
Patch Set: Created Aug. 16, 2013, 2:56 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/engine/UpdateInstallDialog.cpp ('k') | src/plugin/PluginUserSettings.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginClass.cpp
===================================================================
--- a/src/plugin/PluginClass.cpp
+++ b/src/plugin/PluginClass.cpp
@@ -989,7 +989,7 @@
m_pWndProcStatus = (WNDPROC)SetWindowLongPtr(hWndStatusBar, GWLP_WNDPROC, (LPARAM)(WNDPROC)NewStatusProc);
// Adjust pane
- UINT nPartCount = ::SendMessage(m_hStatusBarWnd, SB_GETPARTS, 0, 0);
+ LRESULT nPartCount = ::SendMessage(m_hStatusBarWnd, SB_GETPARTS, 0, 0);
if (nPartCount > 1)
{
@@ -1390,7 +1390,7 @@
}
fmii.fMask = MIIM_STRING | MIIM_STATE;
fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str());
- fmii.cch = ctext.size();
+ fmii.cch = static_cast<UINT>(ctext.size());
::SetMenuItemInfoW(hMenu, ID_MENU_DISABLE_ON_SITE, FALSE, &fmii);
}
@@ -1405,7 +1405,7 @@
fmii.fMask = MIIM_STATE | MIIM_STRING;
fmii.fState = client ? MFS_ENABLED : MFS_DISABLED;
fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str());
- fmii.cch = ctext.size();
+ fmii.cch = static_cast<UINT>(ctext.size());
::SetMenuItemInfoW(hMenu, ID_MENU_UPDATE, FALSE, &fmii);
@@ -1421,7 +1421,7 @@
}
fmii.fMask = MIIM_STATE | MIIM_STRING;
fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str());
- fmii.cch = ctext.size();
+ fmii.cch = static_cast<UINT>(ctext.size());
::SetMenuItemInfoW(hMenu, ID_MENU_DISABLE, FALSE, &fmii);
// Settings
@@ -1429,7 +1429,7 @@
fmii.fMask = MIIM_STATE | MIIM_STRING;
fmii.fState = MFS_ENABLED;
fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str());
- fmii.cch = ctext.size();
+ fmii.cch = static_cast<UINT>(ctext.size());
::SetMenuItemInfoW(hMenu, ID_MENU_SETTINGS, FALSE, &fmii);
return true;
@@ -1552,7 +1552,7 @@
return CallWindowProc(pClass->m_pWndProcStatus, hWnd, message, wParam, lParam);
}
- int nParts = wParam;
+ int nParts = static_cast<int>(wParam);
Wladimir Palant 2013/08/17 09:10:07 Do we need a cast here? From the look of it, using
Felix Dahlke 2013/08/17 09:23:29 It's not necessary, we can do numerical comparison
Felix Dahlke 2013/08/17 09:23:29 Yes, the cast is not strictly speaking necessary,
Wladimir Palant 2013/08/17 09:43:04 Well, WPARAM is still a number type even though it
if (STATUSBAR_PANE_NUMBER >= nParts)
{
return CallWindowProc(pClass->m_pWndProcStatus, hWnd, message, wParam, lParam);
« no previous file with comments | « src/engine/UpdateInstallDialog.cpp ('k') | src/plugin/PluginUserSettings.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld