use GetSize() instead of deprecated StreamSize() in the examples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b9e19bd943
commit
90e3949c04
@ -44,7 +44,7 @@ Example of using wxFTP for file downloading:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
size_t size = in->StreamSize();
|
size_t size = in->GetSize();
|
||||||
char *data = new char[size];
|
char *data = new char[size];
|
||||||
if ( !in->Read(data, size) )
|
if ( !in->Read(data, size) )
|
||||||
{
|
{
|
||||||
@ -365,9 +365,9 @@ send new commands without reconnecting.
|
|||||||
ftp.ChDir("a_directory");
|
ftp.ChDir("a_directory");
|
||||||
in_stream = ftp.GetInputStream("a_file_to_get");
|
in_stream = ftp.GetInputStream("a_file_to_get");
|
||||||
|
|
||||||
data = new char[in_stream->StreamSize()];
|
data = new char[in_stream->GetSize()];
|
||||||
|
|
||||||
in_stream->Read(data, in_stream->StreamSize());
|
in_stream->Read(data, in_stream->GetSize());
|
||||||
if (in_stream->LastError() != wxStream_NOERROR) {
|
if (in_stream->LastError() != wxStream_NOERROR) {
|
||||||
// Do something.
|
// Do something.
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user