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

Unified Diff: xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp

Issue 1668003003: Call CXFA_Object::ToNode() rather than C-style casting. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 months 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/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
diff --git a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
index 851dbcdac2795b39387ef54f5b7bc39176875c85..d2a9212b0591b07e51b0ad6be130cd8245f985da 100644
--- a/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
+++ b/xfa/src/fxfa/src/parser/xfa_script_layoutpseudomodel.cpp
@@ -64,7 +64,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(
CFX_WideString wsUnit = FX_WSTRC(L"pt");
int32_t iIndex = 0;
if (iLength >= 1) {
- pNode = (CXFA_Node*)pArguments->GetObject(0);
+ pNode = static_cast<CXFA_Node*>(pArguments->GetObject(0));
}
if (iLength >= 2) {
CFX_ByteString bsUnit = pArguments->GetUTF8String(1);
@@ -176,7 +176,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageSpan(
}
CXFA_Node* pNode = NULL;
if (iLength >= 1) {
- pNode = (CXFA_Node*)pArguments->GetObject(0);
+ pNode = static_cast<CXFA_Node*>(pArguments->GetObject(0));
}
if (!pNode) {
return;
@@ -440,7 +440,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageInBatch(
}
CXFA_Node* pNode = NULL;
if (iLength >= 1) {
- pNode = (CXFA_Node*)pArguments->GetObject(0);
+ pNode = static_cast<CXFA_Node*>(pArguments->GetObject(0));
}
if (!pNode) {
return;
@@ -474,7 +474,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetInBatch(
}
CXFA_Node* pNode = NULL;
if (iLength >= 1) {
- pNode = (CXFA_Node*)pArguments->GetObject(0);
+ pNode = static_cast<CXFA_Node*>(pArguments->GetObject(0));
}
if (!pNode) {
return;
@@ -528,7 +528,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageImp(
}
CXFA_Node* pNode = NULL;
if (iLength >= 1) {
- pNode = (CXFA_Node*)pArguments->GetObject(0);
+ pNode = static_cast<CXFA_Node*>(pArguments->GetObject(0));
}
int32_t iPage = 0;
FXJSE_HVALUE hValue = pArguments->GetReturnValue();

Powered by Google App Engine
This is Rietveld 408576698