Browse Source

Reverted 6ca7af73cf "Optimised the base class implementation of InputStream::skipNextBytes() a bit"

tags/2021-05-28
Tom Poole 6 years ago
parent
commit
5c26cd5586
1 changed files with 0 additions and 4 deletions
  1. +0
    -4
      modules/juce_core/streams/juce_InputStream.cpp

+ 0
- 4
modules/juce_core/streams/juce_InputStream.cpp View File

@@ -218,10 +218,6 @@ void InputStream::skipNextBytes (int64 numBytesToSkip)
{ {
if (numBytesToSkip > 0) if (numBytesToSkip > 0)
{ {
// try to just set the position first as this will be much faster than reading each byte
if (setPosition (getPosition() + numBytesToSkip))
return;
auto skipBufferSize = (int) jmin (numBytesToSkip, (int64) 16384); auto skipBufferSize = (int) jmin (numBytesToSkip, (int64) 16384);
HeapBlock<char> temp (skipBufferSize); HeapBlock<char> temp (skipBufferSize);


Loading…
Cancel
Save