summaryrefslogtreecommitdiff
path: root/core/src/fxge/agg/agg23/agg_array.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-05-19 15:19:32 -0700
committerTom Sepez <tsepez@chromium.org>2015-05-19 15:19:32 -0700
commit981a3468319eb24e696bb64ba84d9631fd26f1f7 (patch)
treec1136b807975ccc80199ff6593e69475261c1670 /core/src/fxge/agg/agg23/agg_array.h
parentbf4aa2cc93a67826247e887b2ba26a1b965eb616 (diff)
downloadpdfium-981a3468319eb24e696bb64ba84d9631fd26f1f7.tar.xz
Re-land: Remove FX_Alloc() null checks now that it can't return NULL.
Fixes the ordering of some assignments broken when converting to checked numerics in CFX_PathData::AddPointCount(). Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1135893008
Diffstat (limited to 'core/src/fxge/agg/agg23/agg_array.h')
-rw-r--r--core/src/fxge/agg/agg23/agg_array.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/src/fxge/agg/agg23/agg_array.h b/core/src/fxge/agg/agg23/agg_array.h
index b3b5f2b877..810eb4ef22 100644
--- a/core/src/fxge/agg/agg23/agg_array.h
+++ b/core/src/fxge/agg/agg23/agg_array.h
@@ -111,12 +111,8 @@ void pod_array<T>::capacity(unsigned cap, unsigned extra_tail)
m_capacity = 0;
} else if(full_cap > m_capacity) {
FX_Free(m_array);
- m_array = 0;
- m_capacity = 0;
m_array = FX_Alloc(T, full_cap);
- if (m_array) {
- m_capacity = full_cap;
- }
+ m_capacity = full_cap;
}
}
template<class T>