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

Side by Side Diff: xfa/fde/css/fde_csssyntax.h

Issue 1960673003: Replace some calls to Release() with direct delete, part 1. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add unique ptrs Created 4 years, 7 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 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 XFA_FDE_CSS_FDE_CSSSYNTAX_H_ 7 #ifndef XFA_FDE_CSS_FDE_CSSSYNTAX_H_
8 #define XFA_FDE_CSS_FDE_CSSSYNTAX_H_ 8 #define XFA_FDE_CSS_FDE_CSSSYNTAX_H_
9 9
10 #include "xfa/fde/css/fde_css.h" 10 #include "xfa/fde/css/fde_css.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 FDE_CSSSYNTAXMODE_URI, 70 FDE_CSSSYNTAXMODE_URI,
71 FDE_CSSSYNTAXMODE_MediaType, 71 FDE_CSSSYNTAXMODE_MediaType,
72 FDE_CSSSYNTAXMODE_Selector, 72 FDE_CSSSYNTAXMODE_Selector,
73 FDE_CSSSYNTAXMODE_PropertyName, 73 FDE_CSSSYNTAXMODE_PropertyName,
74 FDE_CSSSYNTAXMODE_PropertyValue, 74 FDE_CSSSYNTAXMODE_PropertyValue,
75 }; 75 };
76 76
77 class CFDE_CSSSyntaxParser : public CFX_Target { 77 class CFDE_CSSSyntaxParser : public CFX_Target {
78 public: 78 public:
79 CFDE_CSSSyntaxParser(); 79 CFDE_CSSSyntaxParser();
80 ~CFDE_CSSSyntaxParser(); 80 ~CFDE_CSSSyntaxParser() override;
81 81
82 void Release() { delete this; }
83 FX_BOOL Init(IFX_Stream* pStream, 82 FX_BOOL Init(IFX_Stream* pStream,
84 int32_t iCSSPlaneSize, 83 int32_t iCSSPlaneSize,
85 int32_t iTextDataSize = 32, 84 int32_t iTextDataSize = 32,
86 FX_BOOL bOnlyDeclaration = FALSE); 85 FX_BOOL bOnlyDeclaration = FALSE);
87 FX_BOOL Init(const FX_WCHAR* pBuffer, 86 FX_BOOL Init(const FX_WCHAR* pBuffer,
88 int32_t iBufferSize, 87 int32_t iBufferSize,
89 int32_t iTextDatSize = 32, 88 int32_t iTextDatSize = 32,
90 FX_BOOL bOnlyDeclaration = FALSE); 89 FX_BOOL bOnlyDeclaration = FALSE);
91 FDE_CSSSYNTAXSTATUS DoSyntaxParse(); 90 FDE_CSSSYNTAXSTATUS DoSyntaxParse();
92 const FX_WCHAR* GetCurrentString(int32_t& iLength) const; 91 const FX_WCHAR* GetCurrentString(int32_t& iLength) const;
(...skipping 19 matching lines...) Expand all
112 CFDE_CSSTextBuf m_TextData; 111 CFDE_CSSTextBuf m_TextData;
113 CFDE_CSSTextBuf m_TextPlane; 112 CFDE_CSSTextBuf m_TextPlane;
114 int32_t m_iTextDatLen; 113 int32_t m_iTextDatLen;
115 uint32_t m_dwCheck; 114 uint32_t m_dwCheck;
116 FDE_CSSSYNTAXMODE m_eMode; 115 FDE_CSSSYNTAXMODE m_eMode;
117 FDE_CSSSYNTAXSTATUS m_eStatus; 116 FDE_CSSSYNTAXSTATUS m_eStatus;
118 CFX_StackTemplate<FDE_CSSSYNTAXMODE> m_ModeStack; 117 CFX_StackTemplate<FDE_CSSSYNTAXMODE> m_ModeStack;
119 }; 118 };
120 119
121 #endif // XFA_FDE_CSS_FDE_CSSSYNTAX_H_ 120 #endif // XFA_FDE_CSS_FDE_CSSSYNTAX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698