Switch to NOTREACHED_NORETURN() in core/fxge/win32
Change NOTREACHED() to NOTREACHED_NORETURN().
Bug: pdfium:2008
Change-Id: I40226d4c003f7dcfd55746e67afee5d6157ff222
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/115470
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxge/win32/cgdi_device_driver.cpp b/core/fxge/win32/cgdi_device_driver.cpp
index e22d4aa..b711d83 100644
--- a/core/fxge/win32/cgdi_device_driver.cpp
+++ b/core/fxge/win32/cgdi_device_driver.cpp
@@ -374,8 +374,7 @@
case FXDC_RENDER_CAPS:
return m_RenderCaps;
default:
- NOTREACHED();
- return 0;
+ NOTREACHED_NORETURN();
}
}
@@ -541,16 +540,14 @@
bool CGdiDeviceDriver::MultiplyAlpha(float alpha) {
// Not implemented. All callers are using `CFX_DIBitmap`-backed raster devices
// anyway.
- NOTREACHED();
- return false;
+ NOTREACHED_NORETURN();
}
bool CGdiDeviceDriver::MultiplyAlphaMask(
const RetainPtr<const CFX_DIBBase>& mask) {
// Not implemented. All callers are using `CFX_DIBitmap`-backed raster devices
// anyway.
- NOTREACHED();
- return false;
+ NOTREACHED_NORETURN();
}
void CGdiDeviceDriver::DrawLine(float x1, float y1, float x2, float y2) {
diff --git a/core/fxge/win32/cps_printer_driver.cpp b/core/fxge/win32/cps_printer_driver.cpp
index 2df6f28..3957520 100644
--- a/core/fxge/win32/cps_printer_driver.cpp
+++ b/core/fxge/win32/cps_printer_driver.cpp
@@ -36,8 +36,7 @@
return CFX_PSRenderer::RenderingLevel::kLevel3Type42;
default:
// |mode| should be PostScript.
- NOTREACHED();
- return CFX_PSRenderer::RenderingLevel::kLevel2;
+ NOTREACHED_NORETURN();
}
}
@@ -110,8 +109,7 @@
case FXDC_VERT_SIZE:
return m_VertSize;
default:
- NOTREACHED();
- return 0;
+ NOTREACHED_NORETURN();
}
}
@@ -213,14 +211,12 @@
bool CPSPrinterDriver::MultiplyAlpha(float alpha) {
// PostScript doesn't support transparency. All callers are using
// `CFX_DIBitmap`-backed raster devices anyway.
- NOTREACHED();
- return false;
+ NOTREACHED_NORETURN();
}
bool CPSPrinterDriver::MultiplyAlphaMask(
const RetainPtr<const CFX_DIBBase>& mask) {
// PostScript doesn't support transparency. All callers are using
// `CFX_DIBitmap`-backed raster devices anyway.
- NOTREACHED();
- return false;
+ NOTREACHED_NORETURN();
}
diff --git a/core/fxge/win32/ctext_only_printer_driver.cpp b/core/fxge/win32/ctext_only_printer_driver.cpp
index dd4d90d..8696b88 100644
--- a/core/fxge/win32/ctext_only_printer_driver.cpp
+++ b/core/fxge/win32/ctext_only_printer_driver.cpp
@@ -50,8 +50,7 @@
case FXDC_VERT_SIZE:
return m_VertSize;
default:
- NOTREACHED();
- return 0;
+ NOTREACHED_NORETURN();
}
}
@@ -183,14 +182,12 @@
bool CTextOnlyPrinterDriver::MultiplyAlpha(float alpha) {
// Not needed. All callers are using `CFX_DIBitmap`-backed raster devices
// anyway.
- NOTREACHED();
- return false;
+ NOTREACHED_NORETURN();
}
bool CTextOnlyPrinterDriver::MultiplyAlphaMask(
const RetainPtr<const CFX_DIBBase>& mask) {
// Not needed. All callers are using `CFX_DIBitmap`-backed raster devices
// anyway.
- NOTREACHED();
- return false;
+ NOTREACHED_NORETURN();
}