From 411f1185f44b7862a9b1c16e588407ae197752dd Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 19 May 2016 17:31:01 -0700 Subject: Remove Release() from IFXCRT_FileAccess. Remove some unused impls. Review-Url: https://codereview.chromium.org/1994323002 --- core/fxcrt/fxcrt_posix.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core/fxcrt/fxcrt_posix.cpp') diff --git a/core/fxcrt/fxcrt_posix.cpp b/core/fxcrt/fxcrt_posix.cpp index 9237acef6b..053f89c2c9 100644 --- a/core/fxcrt/fxcrt_posix.cpp +++ b/core/fxcrt/fxcrt_posix.cpp @@ -11,9 +11,12 @@ #if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || \ _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \ _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_ -IFXCRT_FileAccess* FXCRT_FileAccess_Create() { + +// static +IFXCRT_FileAccess* IFXCRT_FileAccess::Create() { return new CFXCRT_FileAccess_Posix; } + void FXCRT_Posix_GetFileMode(uint32_t dwModes, int32_t& nFlags, int32_t& nMasks) { @@ -54,9 +57,6 @@ void CFXCRT_FileAccess_Posix::Close() { close(m_nFD); m_nFD = -1; } -void CFXCRT_FileAccess_Posix::Release() { - delete this; -} FX_FILESIZE CFXCRT_FileAccess_Posix::GetSize() const { if (m_nFD < 0) { return 0; @@ -127,4 +127,5 @@ FX_BOOL CFXCRT_FileAccess_Posix::Truncate(FX_FILESIZE szFile) { } return !ftruncate(m_nFD, szFile); } + #endif -- cgit v1.2.3