From 9a2f69f26c136ef4b53285edc28f4e494997f630 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 20 Apr 2017 13:13:54 -0400 Subject: Move fxcrt_stream code to fx_stream file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This Cl consolidates the stream code into fx_stream. Change-Id: I22a250b4ca6e342592b81260d2a918ebab7f60a2 Reviewed-on: https://pdfium-review.googlesource.com/4373 Commit-Queue: dsinclair Reviewed-by: Nicolás Peña --- core/fxcrt/fx_stream.cpp | 20 ++++++++++++++++++++ core/fxcrt/fxcrt_stream.cpp | 27 --------------------------- 2 files changed, 20 insertions(+), 27 deletions(-) delete mode 100644 core/fxcrt/fxcrt_stream.cpp (limited to 'core') diff --git a/core/fxcrt/fx_stream.cpp b/core/fxcrt/fx_stream.cpp index c60a546ddd..a0086f269e 100644 --- a/core/fxcrt/fx_stream.cpp +++ b/core/fxcrt/fx_stream.cpp @@ -305,3 +305,23 @@ CFX_RetainPtr IFX_MemoryStream::Create(uint8_t* pBuffer, CFX_RetainPtr IFX_MemoryStream::Create(bool bConsecutive) { return pdfium::MakeRetain(bConsecutive); } + +bool IFX_SeekableWriteStream::WriteBlock(const void* pData, size_t size) { + return WriteBlock(pData, GetSize(), size); +} + +bool IFX_SeekableReadStream::IsEOF() { + return false; +} + +FX_FILESIZE IFX_SeekableReadStream::GetPosition() { + return 0; +} + +size_t IFX_SeekableReadStream::ReadBlock(void* buffer, size_t size) { + return 0; +} + +bool IFX_SeekableStream::WriteBlock(const void* buffer, size_t size) { + return WriteBlock(buffer, GetSize(), size); +} diff --git a/core/fxcrt/fxcrt_stream.cpp b/core/fxcrt/fxcrt_stream.cpp deleted file mode 100644 index 3afe6323b2..0000000000 --- a/core/fxcrt/fxcrt_stream.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#include "core/fxcrt/fx_stream.h" - -bool IFX_SeekableWriteStream::WriteBlock(const void* pData, size_t size) { - return WriteBlock(pData, GetSize(), size); -} - -bool IFX_SeekableReadStream::IsEOF() { - return false; -} - -FX_FILESIZE IFX_SeekableReadStream::GetPosition() { - return 0; -} - -size_t IFX_SeekableReadStream::ReadBlock(void* buffer, size_t size) { - return 0; -} - -bool IFX_SeekableStream::WriteBlock(const void* buffer, size_t size) { - return WriteBlock(buffer, GetSize(), size); -} -- cgit v1.2.3