Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1301)

Unified Diff: xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp

Issue 1503583003: Remove C-Style casts in severl other fwl_...imp.cpp files (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp
diff --git a/xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp b/xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp
index 9ae21d2a5e7afa485687eb93befb5fed8af3b0fd..db84a56a9fab056170b4a80147cd0c0db175c272 100644
--- a/xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp
@@ -148,8 +148,8 @@ FWL_ERR CFWL_ScrollBarImp::Finalize() {
FWL_ERR CFWL_ScrollBarImp::GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize) {
if (bAutoSize) {
rect.Set(0, 0, 0, 0);
- FX_FLOAT* pfMinWidth =
- (FX_FLOAT*)GetThemeCapacity(FWL_WGTCAPACITY_ScrollBarWidth);
+ FX_FLOAT* pfMinWidth = static_cast<FX_FLOAT*>(
+ GetThemeCapacity(FWL_WGTCAPACITY_ScrollBarWidth));
if (!pfMinWidth)
return FWL_ERR_Indefinite;
if (IsVertical()) {
@@ -320,7 +320,8 @@ void CFWL_ScrollBarImp::Layout() {
IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
CFWL_ThemePart part;
part.m_pWidget = m_pInterface;
- m_fMinThumb = *(FX_FLOAT*)pTheme->GetCapacity(&part, FWL_CAPACITY_SCB_Size);
+ m_fMinThumb = *static_cast<FX_FLOAT*>(
+ pTheme->GetCapacity(&part, FWL_CAPACITY_SCB_Size));
m_bCustomLayout = pTheme->IsCustomizedLayout(m_pInterface);
GetClientRect(m_rtClient);
CalcButtonLen();
@@ -659,7 +660,7 @@ int32_t CFWL_ScrollBarImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
int32_t iRet = 1;
FX_DWORD dwMsgCode = pMessage->GetClassID();
if (dwMsgCode == FWL_MSGHASH_Mouse) {
- CFWL_MsgMouse* pMsg = (CFWL_MsgMouse*)pMessage;
+ CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
FX_DWORD dwCmd = pMsg->m_dwCmd;
switch (dwCmd) {
case FWL_MSGMOUSECMD_LButtonDown: {
@@ -681,7 +682,7 @@ int32_t CFWL_ScrollBarImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
default: { iRet = 0; }
}
} else if (dwMsgCode == FWL_MSGHASH_MouseWheel) {
- CFWL_MsgMouseWheel* pMsg = (CFWL_MsgMouseWheel*)pMessage;
+ CFWL_MsgMouseWheel* pMsg = static_cast<CFWL_MsgMouseWheel*>(pMessage);
OnMouseWheel(pMsg->m_fx, pMsg->m_fy, pMsg->m_dwFlags, pMsg->m_fDeltaX,
pMsg->m_fDeltaY);
} else {

Powered by Google App Engine
This is Rietveld 408576698