Use different method to get NSData bytes
This commit is contained in:
@@ -173,11 +173,9 @@ wxWebResponseURLSession::~wxWebResponseURLSession()
|
|||||||
|
|
||||||
void wxWebResponseURLSession::HandleData(WX_NSData data)
|
void wxWebResponseURLSession::HandleData(WX_NSData data)
|
||||||
{
|
{
|
||||||
[data enumerateByteRangesUsingBlock:^(const void * _Nonnull bytes, NSRange byteRange, BOOL * _Nonnull stop) {
|
void* buf = GetDataBuffer(data.length);
|
||||||
void* buf = GetDataBuffer(byteRange.length);
|
[data getBytes:buf length:data.length];
|
||||||
std::memcpy(buf, bytes, byteRange.length);
|
ReportDataReceived(data.length);
|
||||||
ReportDataReceived(byteRange.length);
|
|
||||||
}];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxInt64 wxWebResponseURLSession::GetContentLength() const
|
wxInt64 wxWebResponseURLSession::GetContentLength() const
|
||||||
|
Reference in New Issue
Block a user