@@ -208,7 +208,7 @@ namespace
208
208
m_streamEOF (0 ),
209
209
mRefCount (1 )
210
210
{
211
- assert (mBlob .GetBufferPointer () && mBlob .GetBufferSize () > 0 );
211
+ assert (mBlob .GetConstBufferPointer () && mBlob .GetBufferSize () > 0 );
212
212
}
213
213
214
214
public:
@@ -254,7 +254,7 @@ namespace
254
254
HRESULT STDMETHODCALLTYPE Read (void * pv, ULONG cb, ULONG* pcbRead) override
255
255
{
256
256
size_t maxRead = m_streamEOF - m_streamPosition;
257
- auto ptr = static_cast < const uint8_t *>( mBlob .GetBufferPointer () );
257
+ auto ptr = mBlob .GetBufferPointer ();
258
258
if (cb > maxRead)
259
259
{
260
260
const uint64_t pos = uint64_t (m_streamPosition) + uint64_t (maxRead);
@@ -324,7 +324,7 @@ namespace
324
324
if (pos > UINT32_MAX)
325
325
return HRESULT_E_ARITHMETIC_OVERFLOW;
326
326
327
- auto ptr = static_cast < uint8_t *>( mBlob .GetBufferPointer () );
327
+ auto ptr = mBlob .GetBufferPointer ();
328
328
memcpy (&ptr[m_streamPosition], pv, cb);
329
329
330
330
m_streamPosition = static_cast <size_t >(pos);
@@ -347,7 +347,7 @@ namespace
347
347
348
348
if (blobSize >= size.LowPart )
349
349
{
350
- auto ptr = static_cast < uint8_t *>( mBlob .GetBufferPointer () );
350
+ auto ptr = mBlob .GetBufferPointer ();
351
351
if (m_streamEOF < size.LowPart )
352
352
{
353
353
memset (&ptr[m_streamEOF], 0 , size.LowPart - m_streamEOF);
@@ -367,7 +367,7 @@ namespace
367
367
if (FAILED (hr))
368
368
return hr;
369
369
370
- auto ptr = static_cast < uint8_t *>( mBlob .GetBufferPointer () );
370
+ auto ptr = mBlob .GetBufferPointer ();
371
371
if (m_streamEOF < size.LowPart )
372
372
{
373
373
memset (&ptr[m_streamEOF], 0 , size.LowPart - m_streamEOF);
0 commit comments