From ea3a2529a7aa0199b385b7caa2e465c124eac8aa Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 26 Apr 2018 18:33:58 +0000 Subject: Replace some c-style cast with static_cast<> Change-Id: I9dd6a36770f77f3df6c4395572785d37402eadc2 Reviewed-on: https://pdfium-review.googlesource.com/31350 Commit-Queue: dsinclair Reviewed-by: dsinclair --- fxjs/cjs_eventhandler.cpp | 4 ++-- fxjs/xfa/cjx_object.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'fxjs') diff --git a/fxjs/cjs_eventhandler.cpp b/fxjs/cjs_eventhandler.cpp index b09ca7e733..933970954a 100644 --- a/fxjs/cjs_eventhandler.cpp +++ b/fxjs/cjs_eventhandler.cpp @@ -152,7 +152,7 @@ void CJS_EventHandler::OnField_Focus(bool bModifier, m_bModifier = bModifier; m_bShift = bShift; m_strTargetName = pTarget->GetFullName(); - m_pValue = (WideString*)&Value; + m_pValue = const_cast(&Value); } void CJS_EventHandler::OnField_Blur(bool bModifier, @@ -164,7 +164,7 @@ void CJS_EventHandler::OnField_Blur(bool bModifier, m_bModifier = bModifier; m_bShift = bShift; m_strTargetName = pTarget->GetFullName(); - m_pValue = (WideString*)&Value; + m_pValue = const_cast(&Value); } void CJS_EventHandler::OnField_Keystroke(WideString& strChange, diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp index 0ac2f44123..cda4c6a45a 100644 --- a/fxjs/xfa/cjx_object.cpp +++ b/fxjs/xfa/cjx_object.cpp @@ -246,7 +246,7 @@ bool CJX_Object::SetAttribute(XFA_Attribute eAttr, } void CJX_Object::SetMapModuleString(void* pKey, const WideStringView& wsValue) { - SetMapModuleBuffer(pKey, (void*)wsValue.unterminated_c_str(), + SetMapModuleBuffer(pKey, const_cast(wsValue.unterminated_c_str()), wsValue.GetLength() * sizeof(wchar_t), nullptr); } -- cgit v1.2.3