From d7120eead6f6e0b05c1197e55e899081deae1289 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 11 Apr 2017 09:03:14 -0400 Subject: Disabiguate CreateStream calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL creates a CreateReadStream and CreateWriteStream method instead of having a single overloaded method. This removes the need for the cast at the call sites. The access parameter has been rolled into the method as it was always passed the same way to each Create*Stream method. Change-Id: I845951c3fe386b8051daf4f6b2ee5ba29b5c7d54 Reviewed-on: https://pdfium-review.googlesource.com/4032 Reviewed-by: Nicolás Peña Commit-Queue: dsinclair --- xfa/fgas/crt/ifgas_stream.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'xfa/fgas/crt/ifgas_stream.h') diff --git a/xfa/fgas/crt/ifgas_stream.h b/xfa/fgas/crt/ifgas_stream.h index 01a148019f..31d1e67589 100644 --- a/xfa/fgas/crt/ifgas_stream.h +++ b/xfa/fgas/crt/ifgas_stream.h @@ -13,7 +13,6 @@ enum FX_STREAMACCESS { FX_STREAMACCESS_Binary = 0x00, - FX_STREAMACCESS_Text = 0x01, FX_STREAMACCESS_Read = 0x02, FX_STREAMACCESS_Write = 0x04, FX_STREAMACCESS_Truncate = 0x10, @@ -29,15 +28,12 @@ enum FX_STREAMSEEK { class IFGAS_Stream : public CFX_Retainable { public: - static CFX_RetainPtr CreateStream( - const CFX_RetainPtr& pFileRead, - uint32_t dwAccess); - static CFX_RetainPtr CreateStream( - const CFX_RetainPtr& pFileWrite, - uint32_t dwAccess); + static CFX_RetainPtr CreateReadStream( + const CFX_RetainPtr& pFileRead); + static CFX_RetainPtr CreateWriteStream( + const CFX_RetainPtr& pFileWrite); static CFX_RetainPtr CreateStream(uint8_t* pData, - int32_t length, - uint32_t dwAccess); + int32_t length); virtual uint32_t GetAccessModes() const = 0; virtual int32_t GetLength() const = 0; -- cgit v1.2.3