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

Side by Side Diff: core/fpdfapi/fpdf_page/cpdf_contentmark.h

Issue 2310693002: Use safe bool conversion operators in fpdf_page/ (Closed)
Patch Set: Created 4 years, 3 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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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_FPDFAPI_FPDF_PAGE_CPDF_CONTENTMARK_H_ 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_CONTENTMARK_H_
8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_CONTENTMARK_H_ 8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_CONTENTMARK_H_
9 9
10 #include "core/fpdfapi/fpdf_page/cpdf_contentmarkdata.h" 10 #include "core/fpdfapi/fpdf_page/cpdf_contentmarkdata.h"
(...skipping 12 matching lines...) Expand all
23 int CountItems() const; 23 int CountItems() const;
24 const CPDF_ContentMarkItem& GetItem(int i) const; 24 const CPDF_ContentMarkItem& GetItem(int i) const;
25 25
26 bool HasMark(const CFX_ByteStringC& mark) const; 26 bool HasMark(const CFX_ByteStringC& mark) const;
27 bool LookupMark(const CFX_ByteStringC& mark, CPDF_Dictionary*& pDict) const; 27 bool LookupMark(const CFX_ByteStringC& mark, CPDF_Dictionary*& pDict) const;
28 void AddMark(const CFX_ByteString& name, 28 void AddMark(const CFX_ByteString& name,
29 CPDF_Dictionary* pDict, 29 CPDF_Dictionary* pDict,
30 FX_BOOL bDirect); 30 FX_BOOL bDirect);
31 void DeleteLastMark(); 31 void DeleteLastMark();
32 32
33 operator bool() const { return !!m_Ref; } 33 explicit operator bool() const { return !!m_Ref; }
34 34
35 private: 35 private:
36 CFX_CountRef<CPDF_ContentMarkData> m_Ref; 36 CFX_CountRef<CPDF_ContentMarkData> m_Ref;
37 }; 37 };
38 38
39 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_CONTENTMARK_H_ 39 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_CONTENTMARK_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_colorstate.h ('k') | core/fpdfapi/fpdf_page/include/cpdf_generalstate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698