Chromium Code Reviews| Index: xfa/fgas/crt/fgas_utils.h |
| diff --git a/xfa/fgas/crt/fgas_utils.h b/xfa/fgas/crt/fgas_utils.h |
| index f01d115b3e00f394c773f3632f6514b668beb733..07979942a84627909ad13210250d864f804a87fe 100644 |
| --- a/xfa/fgas/crt/fgas_utils.h |
| +++ b/xfa/fgas/crt/fgas_utils.h |
| @@ -378,7 +378,7 @@ class CFX_DiscreteArrayTemplate : public CFX_BaseDiscreteArray { |
| : CFX_BaseDiscreteArray(iChunkSize, sizeof(baseType)) {} |
| baseType& GetAt(int32_t index, const baseType& defValue) const { |
| baseType* p = (baseType*)CFX_BaseDiscreteArray::GetAt(index); |
| - return p == NULL ? (baseType&)defValue : *p; |
| + return !p ? (baseType&)defValue : *p; |
|
Lei Zhang
2016/06/23 17:56:00
flip
dsinclair
2016/06/23 18:46:52
Done.
|
| } |
| baseType* GetPtrAt(int32_t index) const { |
| return (baseType*)CFX_BaseDiscreteArray::GetAt(index); |
| @@ -447,7 +447,7 @@ class CFX_ObjectStackTemplate : public CFX_BaseStack { |
| } |
| void Pop() { |
| baseType* p = (baseType*)CFX_BaseStack::GetTopElement(); |
| - if (p != NULL) { |
| + if (p) { |
| p->~baseType(); |
| } |
| CFX_BaseStack::Pop(); |