From b45324bfb414acc595e478dc7dc63ac43c792580 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 22 May 2017 17:05:40 -0700 Subject: Use NOTREACHED() in more places. Change-Id: I88466943171f19259f84add69679741d44c8e123 Reviewed-on: https://pdfium-review.googlesource.com/5551 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez --- core/fxge/dib/cfx_dibsource.cpp | 3 ++- core/fxge/ge/cfx_cliprgn.cpp | 3 ++- core/fxge/skia/fx_skia_device.cpp | 15 +++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'core/fxge') diff --git a/core/fxge/dib/cfx_dibsource.cpp b/core/fxge/dib/cfx_dibsource.cpp index 547f01690c..deb8e15f49 100644 --- a/core/fxge/dib/cfx_dibsource.cpp +++ b/core/fxge/dib/cfx_dibsource.cpp @@ -17,6 +17,7 @@ #include "core/fxge/dib/cfx_imagestretcher.h" #include "core/fxge/dib/cfx_imagetransformer.h" #include "core/fxge/ge/cfx_cliprgn.h" +#include "third_party/base/logging.h" #include "third_party/base/ptr_util.h" namespace { @@ -1136,7 +1137,7 @@ bool CFX_DIBSource::ConvertBuffer( case FXDIB_1bppCmyk: case FXDIB_1bppMask: case FXDIB_1bppRgb: - ASSERT(false); + NOTREACHED(); return false; case FXDIB_8bppMask: { if ((src_format & 0xff) == 1) { diff --git a/core/fxge/ge/cfx_cliprgn.cpp b/core/fxge/ge/cfx_cliprgn.cpp index d2f065dba7..e00cb7c3ad 100644 --- a/core/fxge/ge/cfx_cliprgn.cpp +++ b/core/fxge/ge/cfx_cliprgn.cpp @@ -9,6 +9,7 @@ #include #include "core/fxge/dib/cfx_dibitmap.h" +#include "third_party/base/logging.h" CFX_ClipRgn::CFX_ClipRgn(int width, int height) : m_Type(RectI), m_Box(0, 0, width, height) {} @@ -101,5 +102,5 @@ void CFX_ClipRgn::IntersectMaskF(int left, m_Mask = std::move(new_dib); return; } - ASSERT(false); + NOTREACHED(); } diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index dd48045ce1..a1193fbe9b 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -22,13 +22,8 @@ #include "core/fxge/dib/cfx_imagerenderer.h" #include "core/fxge/dib/cfx_imagestretcher.h" #include "core/fxge/skia/fx_skia_device.h" - -#ifdef _SKIA_SUPPORT_PATHS_ -#include "core/fxge/ge/cfx_cliprgn.h" -#endif // _SKIA_SUPPORT_PATHS_ - +#include "third_party/base/logging.h" #include "third_party/base/ptr_util.h" - #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkClipOp.h" #include "third_party/skia/include/core/SkImage.h" @@ -41,6 +36,10 @@ #include "third_party/skia/include/effects/SkGradientShader.h" #include "third_party/skia/include/pathops/SkPathOps.h" +#ifdef _SKIA_SUPPORT_PATHS_ +#include "core/fxge/ge/cfx_cliprgn.h" +#endif // _SKIA_SUPPORT_PATHS_ + #ifdef _SKIA_SUPPORT_ #include "third_party/skia/include/core/SkColorFilter.h" #include "third_party/skia/include/core/SkColorPriv.h" @@ -112,7 +111,7 @@ void RgbByteOrderTransferBitmap(const CFX_RetainPtr& pBitmap, } } } else { - ASSERT(false); + NOTREACHED(); } return; } @@ -147,7 +146,7 @@ void RgbByteOrderTransferBitmap(const CFX_RetainPtr& pBitmap, return; } - ASSERT(false); + NOTREACHED(); } #endif // _SKIA_SUPPORT_PATHS_ -- cgit v1.2.3