From 99406198ac4921a53425edc73cac67e7b4760895 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 9 Mar 2016 17:37:12 -0800 Subject: Move ScopedSetInsertion to third_party/base/stl_util.h Also move ScopedFileStream, since it isn't specific to the parser, and belongs with the fxcrt object it manipulates. R=ochang@chromium.org Review URL: https://codereview.chromium.org/1780063003 . --- core/include/fpdfapi/fpdf_parser.h | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'core/include/fpdfapi') diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h index 7d7243c90f..705587c513 100644 --- a/core/include/fpdfapi/fpdf_parser.h +++ b/core/include/fpdfapi/fpdf_parser.h @@ -42,25 +42,6 @@ class IPDF_SecurityHandler; #define FPDFPERM_PRINT_HIGH 0x0800 #define FPDF_PAGE_MAX_NUM 0xFFFFF -// TODO(thestig) Using unique_ptr with ReleaseDeleter is still not ideal. -// Come up or wait for something better. -using ScopedFileStream = - std::unique_ptr>; - -template -class ScopedSetInsertion { - public: - ScopedSetInsertion(std::set* org_set, T elem) - : m_Set(org_set), m_Entry(elem) { - m_Set->insert(m_Entry); - } - ~ScopedSetInsertion() { m_Set->erase(m_Entry); } - - private: - std::set* const m_Set; - const T m_Entry; -}; - // Indexed by 8-bit char code, contains unicode code points. extern const FX_WORD PDFDocEncoding[256]; -- cgit v1.2.3