summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-24 19:00:05 -0800
committerLei Zhang <thestig@chromium.org>2015-12-24 19:00:05 -0800
commitd20dfba2ae10e8aeb328328f09da79ff904110a8 (patch)
tree560bc512ddec373595a9f719996e1d13338f72da /core/include
parentbab9a98b71f351cf9f4eb39138bca55e3be4ef15 (diff)
downloadpdfium-d20dfba2ae10e8aeb328328f09da79ff904110a8.tar.xz
Switch from nonstd::unique_ptr to std::unique_ptr.
R=thakis@chromium.org Review URL: https://codereview.chromium.org/1547833002 .
Diffstat (limited to 'core/include')
-rw-r--r--core/include/fpdfapi/fpdf_module.h7
-rw-r--r--core/include/fpdfapi/fpdf_parser.h6
-rw-r--r--core/include/fpdfapi/fpdf_render.h4
-rw-r--r--core/include/fpdfdoc/fpdf_doc.h6
-rw-r--r--core/include/fxcodec/fx_codec.h16
-rw-r--r--core/include/fxcrt/fx_basic.h2
-rw-r--r--core/include/fxge/fx_font.h4
7 files changed, 23 insertions, 22 deletions
diff --git a/core/include/fpdfapi/fpdf_module.h b/core/include/fpdfapi/fpdf_module.h
index 00aed45d1f..e22b63e544 100644
--- a/core/include/fpdfapi/fpdf_module.h
+++ b/core/include/fpdfapi/fpdf_module.h
@@ -7,9 +7,10 @@
#ifndef CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_
#define CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_
+#include <memory>
+
#include "core/include/fxcrt/fx_coordinates.h"
#include "core/include/fxcrt/fx_system.h"
-#include "third_party/base/nonstd_unique_ptr.h"
class CCodec_ModuleMgr;
class CFX_BitmapDevice;
@@ -78,8 +79,8 @@ class CPDF_ModuleMgr {
~CPDF_ModuleMgr();
CCodec_ModuleMgr* m_pCodecModule;
- nonstd::unique_ptr<IPDF_RenderModule> m_pRenderModule;
- nonstd::unique_ptr<IPDF_PageModule> m_pPageModule;
+ std::unique_ptr<IPDF_RenderModule> m_pRenderModule;
+ std::unique_ptr<IPDF_PageModule> m_pPageModule;
FX_BOOL (*m_pDownloadCallback)(const FX_CHAR* module_name);
CFX_PrivateData m_privateData;
};
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index 752df789da..a49fb29d9c 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -8,10 +8,10 @@
#define CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
#include <map>
+#include <memory>
#include "core/include/fxcrt/fx_system.h"
#include "fpdf_objects.h"
-#include "third_party/base/nonstd_unique_ptr.h"
class CFDF_Document;
class CFDF_Parser;
@@ -347,7 +347,7 @@ class CPDF_SyntaxParser {
FX_FILESIZE m_BufOffset;
- nonstd::unique_ptr<CPDF_CryptoHandler> m_pCryptoHandler;
+ std::unique_ptr<CPDF_CryptoHandler> m_pCryptoHandler;
uint8_t m_WordBuffer[257];
@@ -496,7 +496,7 @@ class CPDF_Parser {
FX_BOOL m_bXRefStream;
- nonstd::unique_ptr<CPDF_SecurityHandler> m_pSecurityHandler;
+ std::unique_ptr<CPDF_SecurityHandler> m_pSecurityHandler;
FX_BOOL m_bForceUseSecurityHandler;
diff --git a/core/include/fpdfapi/fpdf_render.h b/core/include/fpdfapi/fpdf_render.h
index 245a85d502..1c8a99ac7d 100644
--- a/core/include/fpdfapi/fpdf_render.h
+++ b/core/include/fpdfapi/fpdf_render.h
@@ -8,10 +8,10 @@
#define CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_
#include <map>
+#include <memory>
#include "core/include/fpdfapi/fpdf_page.h"
#include "core/include/fxge/fx_ge.h"
-#include "third_party/base/nonstd_unique_ptr.h"
class CFX_GraphStateData;
class CFX_PathData;
@@ -151,7 +151,7 @@ class CPDF_ProgressiveRenderer {
CPDF_RenderContext* const m_pContext;
CFX_RenderDevice* const m_pDevice;
const CPDF_RenderOptions* const m_pOptions;
- nonstd::unique_ptr<CPDF_RenderStatus> m_pRenderStatus;
+ std::unique_ptr<CPDF_RenderStatus> m_pRenderStatus;
CFX_FloatRect m_ClipRect;
FX_DWORD m_LayerIndex;
FX_DWORD m_ObjectIndex;
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index 4712f60706..09c93d6c3a 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -8,11 +8,11 @@
#define CORE_INCLUDE_FPDFDOC_FPDF_DOC_H_
#include <map>
+#include <memory>
#include <vector>
#include "core/include/fpdfapi/fpdf_parser.h"
#include "core/include/fpdfapi/fpdf_render.h"
-#include "third_party/base/nonstd_unique_ptr.h"
class CFieldTree;
class CPDF_AAction;
@@ -700,7 +700,7 @@ class CPDF_InterForm : public CFX_PrivateData {
std::map<const CPDF_Dictionary*, CPDF_FormControl*> m_ControlMap;
- nonstd::unique_ptr<CFieldTree> m_pFieldTree;
+ std::unique_ptr<CFieldTree> m_pFieldTree;
CFX_ByteString m_bsEncoding;
@@ -1060,7 +1060,7 @@ class CPDF_Metadata {
const CXML_Element* GetRoot() const;
private:
- nonstd::unique_ptr<CXML_Element> m_pXmlElement;
+ std::unique_ptr<CXML_Element> m_pXmlElement;
};
class CPDF_ViewerPreferences {
diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h
index 1d4d333b33..343b342530 100644
--- a/core/include/fxcodec/fx_codec.h
+++ b/core/include/fxcodec/fx_codec.h
@@ -7,11 +7,11 @@
#ifndef CORE_INCLUDE_FXCODEC_FX_CODEC_H_
#define CORE_INCLUDE_FXCODEC_FX_CODEC_H_
+#include <memory>
#include <vector>
#include "core/include/fxcrt/fx_basic.h"
#include "fx_codec_def.h"
-#include "third_party/base/nonstd_unique_ptr.h"
class CFX_DIBSource;
class CJPX_Decoder;
@@ -42,13 +42,13 @@ class CCodec_ModuleMgr {
ICodec_FlateModule* GetFlateModule() const { return m_pFlateModule.get(); }
protected:
- nonstd::unique_ptr<ICodec_BasicModule> m_pBasicModule;
- nonstd::unique_ptr<ICodec_FaxModule> m_pFaxModule;
- nonstd::unique_ptr<ICodec_JpegModule> m_pJpegModule;
- nonstd::unique_ptr<ICodec_JpxModule> m_pJpxModule;
- nonstd::unique_ptr<ICodec_Jbig2Module> m_pJbig2Module;
- nonstd::unique_ptr<ICodec_IccModule> m_pIccModule;
- nonstd::unique_ptr<ICodec_FlateModule> m_pFlateModule;
+ std::unique_ptr<ICodec_BasicModule> m_pBasicModule;
+ std::unique_ptr<ICodec_FaxModule> m_pFaxModule;
+ std::unique_ptr<ICodec_JpegModule> m_pJpegModule;
+ std::unique_ptr<ICodec_JpxModule> m_pJpxModule;
+ std::unique_ptr<ICodec_Jbig2Module> m_pJbig2Module;
+ std::unique_ptr<ICodec_IccModule> m_pIccModule;
+ std::unique_ptr<ICodec_FlateModule> m_pFlateModule;
};
class ICodec_BasicModule {
public:
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index ef5b204049..bb34e2bc15 100644
--- a/core/include/fxcrt/fx_basic.h
+++ b/core/include/fxcrt/fx_basic.h
@@ -955,7 +955,7 @@ struct FxFreeDeleter {
inline void operator()(void* ptr) const { FX_Free(ptr); }
};
-// Used with nonstd::unique_ptr to Release() objects that can't be deleted.
+// Used with std::unique_ptr to Release() objects that can't be deleted.
template <class T>
struct ReleaseDeleter {
inline void operator()(T* ptr) const { ptr->Release(); }
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index 8234458fe5..d6e3359c61 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -8,10 +8,10 @@
#define CORE_INCLUDE_FXGE_FX_FONT_H_
#include <map>
+#include <memory>
#include "core/include/fxcrt/fx_system.h"
#include "fx_dib.h"
-#include "third_party/base/nonstd_unique_ptr.h"
typedef struct FT_FaceRec_* FXFT_Face;
typedef void* FXFT_Library;
@@ -212,7 +212,7 @@ class CFX_FontMgr {
FXFT_Library GetFTLibrary() const { return m_FTLibrary; }
private:
- nonstd::unique_ptr<CFX_FontMapper> m_pBuiltinMapper;
+ std::unique_ptr<CFX_FontMapper> m_pBuiltinMapper;
std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap;
FXFT_Library m_FTLibrary;
};