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

Side by Side Diff: core/src/fxcrt/xml_int.h

Issue 1529553003: Merge to XFA: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_SRC_FXCRT_XML_INT_H_ 7 #ifndef CORE_SRC_FXCRT_XML_INT_H_
8 #define CORE_SRC_FXCRT_XML_INT_H_ 8 #define CORE_SRC_FXCRT_XML_INT_H_
9 9
10 #include "core/include/fxcrt/fx_stream.h" 10 #include "core/include/fxcrt/fx_stream.h"
(...skipping 30 matching lines...) Expand all
41 const uint8_t* m_pBuffer; 41 const uint8_t* m_pBuffer;
42 size_t m_dwSize; 42 size_t m_dwSize;
43 size_t m_dwCurPos; 43 size_t m_dwCurPos;
44 }; 44 };
45 45
46 #define FX_XMLDATASTREAM_BufferSize (32 * 1024) 46 #define FX_XMLDATASTREAM_BufferSize (32 * 1024)
47 class CXML_DataStmAcc : public IFX_BufferRead { 47 class CXML_DataStmAcc : public IFX_BufferRead {
48 public: 48 public:
49 CXML_DataStmAcc(IFX_FileRead* pFileRead) 49 CXML_DataStmAcc(IFX_FileRead* pFileRead)
50 : m_pFileRead(pFileRead), m_pBuffer(NULL), m_nStart(0), m_dwSize(0) { 50 : m_pFileRead(pFileRead), m_pBuffer(NULL), m_nStart(0), m_dwSize(0) {
51 FXSYS_assert(m_pFileRead != NULL); 51 FXSYS_assert(m_pFileRead);
52 } 52 }
53 ~CXML_DataStmAcc() override { FX_Free(m_pBuffer); } 53 ~CXML_DataStmAcc() override { FX_Free(m_pBuffer); }
54 54
55 void Release() override { delete this; } 55 void Release() override { delete this; }
56 FX_BOOL IsEOF() override { 56 FX_BOOL IsEOF() override {
57 return m_nStart + (FX_FILESIZE)m_dwSize >= m_pFileRead->GetSize(); 57 return m_nStart + (FX_FILESIZE)m_dwSize >= m_pFileRead->GetSize();
58 } 58 }
59 FX_FILESIZE GetPosition() override { 59 FX_FILESIZE GetPosition() override {
60 return m_nStart + (FX_FILESIZE)m_dwSize; 60 return m_nStart + (FX_FILESIZE)m_dwSize;
61 } 61 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const CFX_WideStringC& content, 118 const CFX_WideStringC& content,
119 CXML_Element* pElement); 119 CXML_Element* pElement);
120 void InsertCDATASegment(CFX_UTF8Decoder& decoder, CXML_Element* pElement); 120 void InsertCDATASegment(CFX_UTF8Decoder& decoder, CXML_Element* pElement);
121 }; 121 };
122 122
123 void FX_XML_SplitQualifiedName(const CFX_ByteStringC& bsFullName, 123 void FX_XML_SplitQualifiedName(const CFX_ByteStringC& bsFullName,
124 CFX_ByteStringC& bsSpace, 124 CFX_ByteStringC& bsSpace,
125 CFX_ByteStringC& bsName); 125 CFX_ByteStringC& bsName);
126 126
127 #endif // CORE_SRC_FXCRT_XML_INT_H_ 127 #endif // CORE_SRC_FXCRT_XML_INT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698