From 9c392c82abee05ac2fd42e69984e2de8e48b797a Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 28 Sep 2017 08:51:48 -0400 Subject: Simplify some OS checks to PLATFORM checks This CL simplifies the OS == WIN{32|64} checks to be PLATFORM == WINDOWS checks. Change-Id: I1493d316dd457b0228e4ef39db4cf1d2b8abf97d Reviewed-on: https://pdfium-review.googlesource.com/14870 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fwl/cfwl_notedriver.cpp | 5 ++--- xfa/fwl/cfwl_widgetmgr.cpp | 8 ++++---- xfa/fwl/cfwl_widgetmgr.h | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-) (limited to 'xfa/fwl') diff --git a/xfa/fwl/cfwl_notedriver.cpp b/xfa/fwl/cfwl_notedriver.cpp index e6b869da58..9a19f4b8a7 100644 --- a/xfa/fwl/cfwl_notedriver.cpp +++ b/xfa/fwl/cfwl_notedriver.cpp @@ -106,15 +106,14 @@ bool CFWL_NoteDriver::SetFocus(CFWL_Widget* pFocus) { } void CFWL_NoteDriver::Run() { -#if _FX_OS_ == _FX_OS_LINUX_ || _FX_OS_ == _FX_OS_WIN32_ || \ - _FX_OS_ == _FX_OS_WIN64_ +#if _FX_OS_ == _FX_OS_LINUX_ || _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ for (;;) { CFWL_NoteLoop* pTopLoop = GetTopLoop(); if (!pTopLoop || !pTopLoop->ContinueModal()) break; UnqueueMessageAndProcess(pTopLoop); } -#endif +#endif // _FX_OS_ == _FX_OS_LINUX_ || _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ } void CFWL_NoteDriver::NotifyTargetHide(CFWL_Widget* pNoteTarget) { diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp index e98233bebf..3082b182ad 100644 --- a/xfa/fwl/cfwl_widgetmgr.cpp +++ b/xfa/fwl/cfwl_widgetmgr.cpp @@ -33,9 +33,9 @@ CFWL_WidgetMgr::CFWL_WidgetMgr(CXFA_FFApp* pAdapterNative) m_pAdapter(pAdapterNative->GetFWLAdapterWidgetMgr()) { ASSERT(m_pAdapter); m_mapWidgetItem[nullptr] = pdfium::MakeUnique(); -#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_ +#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ m_rtScreen.Reset(); -#endif +#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ } CFWL_WidgetMgr::~CFWL_WidgetMgr() {} @@ -606,10 +606,10 @@ CFWL_WidgetMgr::Item::Item(CFWL_Widget* widget) pNext(nullptr), pWidget(widget), iRedrawCounter(0) -#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_ +#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ , bOutsideChanged(false) -#endif +#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ { } diff --git a/xfa/fwl/cfwl_widgetmgr.h b/xfa/fwl/cfwl_widgetmgr.h index 550f1d40bf..153d0a903e 100644 --- a/xfa/fwl/cfwl_widgetmgr.h +++ b/xfa/fwl/cfwl_widgetmgr.h @@ -81,9 +81,9 @@ class CFWL_WidgetMgr { CFWL_Widget* const pWidget; std::unique_ptr pOffscreen; int32_t iRedrawCounter; -#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_ +#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ bool bOutsideChanged; -#endif +#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ }; CFWL_Widget* GetFirstSiblingWidget(CFWL_Widget* pWidget) const; @@ -114,9 +114,9 @@ class CFWL_WidgetMgr { uint32_t m_dwCapability; std::map> m_mapWidgetItem; UnownedPtr const m_pAdapter; -#if _FX_OS_ == _FX_OS_WIN32_ || _FX_OS_ == _FX_OS_WIN64_ +#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ CFX_RectF m_rtScreen; -#endif +#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ }; #endif // XFA_FWL_CFWL_WIDGETMGR_H_ -- cgit v1.2.3