From f6e7cd0a1905d0d8389e315dc31808c3ebb7e4b8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 3 Jul 2003 09:58:36 +0000 Subject: [PATCH] fixed comment and docs for GetSize() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/strmbase.tex | 6 +----- include/wx/stream.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/latex/wx/strmbase.tex b/docs/latex/wx/strmbase.tex index 3a18bd74a0..857394939e 100644 --- a/docs/latex/wx/strmbase.tex +++ b/docs/latex/wx/strmbase.tex @@ -100,9 +100,5 @@ the file. \wxheading{Warning} There are streams which do not have size by definition, such as socket streams. -In that cases, GetSize returns an invalid size represented by - -\begin{verbatim} -~(size_t)0 -\end{verbatim} +In that cases, GetSize returns $0$ so you should always test its return value. diff --git a/include/wx/stream.h b/include/wx/stream.h index 2c770c2b3e..151dd0bca4 100644 --- a/include/wx/stream.h +++ b/include/wx/stream.h @@ -81,7 +81,7 @@ public: // reset the stream state void Reset() { m_lasterror = wxSTREAM_NO_ERROR; } - // deprecated (doesn't make sense!), don't use + // this doesn't make sense for all streams, always test its return value virtual size_t GetSize() const { return 0; } #if WXWIN_COMPATIBILITY_2_2