From 36f062d3da45b04cda586d432fccfbdd4e81ce5a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 23 Mar 2009 10:59:40 +0000 Subject: [PATCH] modify signature of new wxStreamBuffer ctors to avoid conflicts with the existing ones (closes #10144) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/stream.h | 4 ++-- interface/wx/stream.h | 14 ++++++++++++-- src/common/stream.cpp | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/include/wx/stream.h b/include/wx/stream.h index c2cb838f92..9119658421 100644 --- a/include/wx/stream.h +++ b/include/wx/stream.h @@ -421,13 +421,13 @@ public: InitWithStream(stream, mode); } - wxStreamBuffer(wxInputStream& stream, size_t bufsize) + wxStreamBuffer(size_t bufsize, wxInputStream& stream) { InitWithStream(stream, read); SetBufferIO(bufsize); } - wxStreamBuffer(wxOutputStream& stream, size_t bufsize) + wxStreamBuffer(size_t bufsize, wxOutputStream& stream) { InitWithStream(stream, write); SetBufferIO(bufsize); diff --git a/interface/wx/stream.h b/interface/wx/stream.h index 2cb6d47e63..7900f3ef0b 100644 --- a/interface/wx/stream.h +++ b/interface/wx/stream.h @@ -172,8 +172,13 @@ public: and calling SetBufferIO() but is more convenient. @since 2.9.0 + + @param bufsize + The size of buffer in bytes. + @param stream + The associated input stream, the buffer will be used in read mode. */ - wxStreamBuffer(wxInputStream& stream, size_t bufsize); + wxStreamBuffer(size_t bufsize, wxInputStream& stream); /** Constructor for an output buffer of the specified size. @@ -182,8 +187,13 @@ public: and calling SetBufferIO() but is more convenient. @since 2.9.0 + + @param bufsize + The size of buffer in bytes. + @param stream + The associated output stream, the buffer will be used in write mode. */ - wxStreamBuffer(wxOutputStream& stream, size_t bufsize); + wxStreamBuffer(size_t bufsize, wxOutputStream& stream); /** Constructor; creates a new empty stream buffer which won't flush any data diff --git a/src/common/stream.cpp b/src/common/stream.cpp index 657e6675d4..8d8a42c870 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -1214,7 +1214,7 @@ template wxStreamBuffer * CreateBufferIfNeeded(T& stream, wxStreamBuffer *buffer, size_t bufsize = 1024) { - return buffer ? buffer : new wxStreamBuffer(stream, bufsize); + return buffer ? buffer : new wxStreamBuffer(bufsize, stream); } } // anonymous namespace -- 2.45.2