diff options
Diffstat (limited to 'core/fxcrt/fxcrt_posix.cpp')
-rw-r--r-- | core/fxcrt/fxcrt_posix.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/fxcrt/fxcrt_posix.cpp b/core/fxcrt/fxcrt_posix.cpp index 562c70c23e..3afe2c32d5 100644 --- a/core/fxcrt/fxcrt_posix.cpp +++ b/core/fxcrt/fxcrt_posix.cpp @@ -6,15 +6,18 @@ #include "core/fxcrt/fxcrt_posix.h" +#include <memory> + #include "core/fxcrt/fx_basic.h" +#include "third_party/base/ptr_util.h" #if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || \ _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \ _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_ // static -IFXCRT_FileAccess* IFXCRT_FileAccess::Create() { - return new CFXCRT_FileAccess_Posix; +std::unique_ptr<IFXCRT_FileAccess> IFXCRT_FileAccess::Create() { + return pdfium::MakeUnique<CFXCRT_FileAccess_Posix>(); } void FXCRT_Posix_GetFileMode(uint32_t dwModes, |