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

Unified Diff: core/src/fxge/apple/fx_quartz_device.cpp

Issue 1287863002: Remove if checks after new. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits Created 5 years, 4 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
« no previous file with comments | « no previous file | fpdfsdk/include/fxedit/fxet_edit.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/apple/fx_quartz_device.cpp
diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp
index 34851e0c80bfae977eff82a47fef760662264d07..61a0cef543cde15c1ad7ef9c22b1e665c1628cb8 100644
--- a/core/src/fxge/apple/fx_quartz_device.cpp
+++ b/core/src/fxge/apple/fx_quartz_device.cpp
@@ -93,9 +93,6 @@ FX_BOOL CQuartz2D::drawGraphicsString(void* graphics,
CGContextSaveGState(context);
#if CGFLOAT_IS_DOUBLE
CGPoint* glyphPositionsCG = new CGPoint[charsCount];
- if (!glyphPositionsCG) {
- return FALSE;
- }
for (int index = 0; index < charsCount; ++index) {
glyphPositionsCG[index].x = glyphPositions[index].x;
glyphPositionsCG[index].y = glyphPositions[index].y;
@@ -908,9 +905,6 @@ void CFX_QuartzDeviceDriver::setStrokeInfo(const CFX_GraphStateData* graphState,
if (graphState->m_DashCount) {
#if CGFLOAT_IS_DOUBLE
CGFloat* dashArray = new CGFloat[graphState->m_DashCount];
- if (!dashArray) {
- return;
- }
for (int index = 0; index < graphState->m_DashCount; ++index) {
dashArray[index] = graphState->m_DashArray[index];
}
« no previous file with comments | « no previous file | fpdfsdk/include/fxedit/fxet_edit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698