upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)
This commit is contained in:
		@ -72,7 +72,7 @@ public:
 | 
			
		||||
                                int windowBits = 0);
 | 
			
		||||
 | 
			
		||||
    /** Destructor. */
 | 
			
		||||
    ~GZIPCompressorOutputStream();
 | 
			
		||||
    ~GZIPCompressorOutputStream() override;
 | 
			
		||||
 | 
			
		||||
    //==============================================================================
 | 
			
		||||
    /** Flushes and closes the stream.
 | 
			
		||||
@ -100,7 +100,6 @@ private:
 | 
			
		||||
    OptionalScopedPointer<OutputStream> destStream;
 | 
			
		||||
 | 
			
		||||
    class GZIPCompressorHelper;
 | 
			
		||||
    friend struct ContainerDeletePolicy<GZIPCompressorHelper>;
 | 
			
		||||
    std::unique_ptr<GZIPCompressorHelper> helper;
 | 
			
		||||
 | 
			
		||||
    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GZIPCompressorOutputStream)
 | 
			
		||||
 | 
			
		||||
@ -36,6 +36,9 @@ namespace zlibNamespace
 | 
			
		||||
   #pragma clang diagnostic ignored "-Wconversion"
 | 
			
		||||
   #pragma clang diagnostic ignored "-Wshadow"
 | 
			
		||||
   #pragma clang diagnostic ignored "-Wdeprecated-register"
 | 
			
		||||
   #if __has_warning("-Wzero-as-null-pointer-constant")
 | 
			
		||||
    #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
 | 
			
		||||
   #endif
 | 
			
		||||
   #if __has_warning("-Wcomma")
 | 
			
		||||
    #pragma clang diagnostic ignored "-Wcomma"
 | 
			
		||||
   #endif
 | 
			
		||||
@ -270,7 +273,7 @@ int GZIPDecompressorInputStream::read (void* destBuffer, int howMany)
 | 
			
		||||
 | 
			
		||||
bool GZIPDecompressorInputStream::isExhausted()
 | 
			
		||||
{
 | 
			
		||||
    return helper->error || isEof;
 | 
			
		||||
    return helper->error || helper->finished || isEof;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int64 GZIPDecompressorInputStream::getPosition()
 | 
			
		||||
@ -295,4 +298,82 @@ bool GZIPDecompressorInputStream::setPosition (int64 newPos)
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//==============================================================================
 | 
			
		||||
#if JUCE_UNIT_TESTS
 | 
			
		||||
 | 
			
		||||
struct GZIPDecompressorInputStreamTests   : public UnitTest
 | 
			
		||||
{
 | 
			
		||||
    GZIPDecompressorInputStreamTests()
 | 
			
		||||
        : UnitTest ("GZIPDecompressorInputStreamTests", "Streams")
 | 
			
		||||
    {}
 | 
			
		||||
 | 
			
		||||
    void runTest() override
 | 
			
		||||
    {
 | 
			
		||||
        const MemoryBlock data ("abcdefghijklmnopqrstuvwxyz", 26);
 | 
			
		||||
 | 
			
		||||
        MemoryOutputStream mo;
 | 
			
		||||
        GZIPCompressorOutputStream gzipOutputStream (mo);
 | 
			
		||||
        gzipOutputStream.write (data.getData(), data.getSize());
 | 
			
		||||
        gzipOutputStream.flush();
 | 
			
		||||
 | 
			
		||||
        MemoryInputStream mi (mo.getData(), mo.getDataSize(), false);
 | 
			
		||||
        GZIPDecompressorInputStream stream (&mi, false, GZIPDecompressorInputStream::zlibFormat, (int64) data.getSize());
 | 
			
		||||
 | 
			
		||||
        beginTest ("Read");
 | 
			
		||||
 | 
			
		||||
        expectEquals (stream.getPosition(), (int64) 0);
 | 
			
		||||
        expectEquals (stream.getTotalLength(), (int64) data.getSize());
 | 
			
		||||
        expectEquals (stream.getNumBytesRemaining(), stream.getTotalLength());
 | 
			
		||||
        expect (! stream.isExhausted());
 | 
			
		||||
 | 
			
		||||
        size_t numBytesRead = 0;
 | 
			
		||||
        MemoryBlock readBuffer (data.getSize());
 | 
			
		||||
 | 
			
		||||
        while (numBytesRead < data.getSize())
 | 
			
		||||
        {
 | 
			
		||||
            numBytesRead += (size_t) stream.read (&readBuffer[numBytesRead], 3);
 | 
			
		||||
 | 
			
		||||
            expectEquals (stream.getPosition(), (int64) numBytesRead);
 | 
			
		||||
            expectEquals (stream.getNumBytesRemaining(), (int64) (data.getSize() - numBytesRead));
 | 
			
		||||
            expect (stream.isExhausted() == (numBytesRead == data.getSize()));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        expectEquals (stream.getPosition(), (int64) data.getSize());
 | 
			
		||||
        expectEquals (stream.getNumBytesRemaining(), (int64) 0);
 | 
			
		||||
        expect (stream.isExhausted());
 | 
			
		||||
 | 
			
		||||
        expect (readBuffer == data);
 | 
			
		||||
 | 
			
		||||
        beginTest ("Skip");
 | 
			
		||||
 | 
			
		||||
        stream.setPosition (0);
 | 
			
		||||
        expectEquals (stream.getPosition(), (int64) 0);
 | 
			
		||||
        expectEquals (stream.getTotalLength(), (int64) data.getSize());
 | 
			
		||||
        expectEquals (stream.getNumBytesRemaining(), stream.getTotalLength());
 | 
			
		||||
        expect (! stream.isExhausted());
 | 
			
		||||
 | 
			
		||||
        numBytesRead = 0;
 | 
			
		||||
        const int numBytesToSkip = 5;
 | 
			
		||||
 | 
			
		||||
        while (numBytesRead < data.getSize())
 | 
			
		||||
        {
 | 
			
		||||
            stream.skipNextBytes (numBytesToSkip);
 | 
			
		||||
            numBytesRead += numBytesToSkip;
 | 
			
		||||
            numBytesRead = std::min (numBytesRead, data.getSize());
 | 
			
		||||
 | 
			
		||||
            expectEquals (stream.getPosition(), (int64) numBytesRead);
 | 
			
		||||
            expectEquals (stream.getNumBytesRemaining(), (int64) (data.getSize() - numBytesRead));
 | 
			
		||||
            expect (stream.isExhausted() == (numBytesRead == data.getSize()));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        expectEquals (stream.getPosition(), (int64) data.getSize());
 | 
			
		||||
        expectEquals (stream.getNumBytesRemaining(), (int64) 0);
 | 
			
		||||
        expect (stream.isExhausted());
 | 
			
		||||
    }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static GZIPDecompressorInputStreamTests gzipDecompressorInputStreamTests;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
} // namespace juce
 | 
			
		||||
 | 
			
		||||
@ -70,7 +70,7 @@ public:
 | 
			
		||||
    GZIPDecompressorInputStream (InputStream& sourceStream);
 | 
			
		||||
 | 
			
		||||
    /** Destructor. */
 | 
			
		||||
    ~GZIPDecompressorInputStream();
 | 
			
		||||
    ~GZIPDecompressorInputStream() override;
 | 
			
		||||
 | 
			
		||||
    //==============================================================================
 | 
			
		||||
    int64 getPosition() override;
 | 
			
		||||
@ -90,7 +90,6 @@ private:
 | 
			
		||||
    HeapBlock<uint8> buffer;
 | 
			
		||||
 | 
			
		||||
    class GZIPDecompressHelper;
 | 
			
		||||
    friend struct ContainerDeletePolicy<GZIPDecompressHelper>;
 | 
			
		||||
    std::unique_ptr<GZIPDecompressHelper> helper;
 | 
			
		||||
 | 
			
		||||
   #if JUCE_CATCH_DEPRECATED_CODE_MISUSE
 | 
			
		||||
 | 
			
		||||
@ -77,7 +77,7 @@ static int64 findCentralDirectoryFileHeader (InputStream& input, int& numEntries
 | 
			
		||||
 | 
			
		||||
    in.setPosition (in.getTotalLength());
 | 
			
		||||
    auto pos = in.getPosition();
 | 
			
		||||
    auto lowestPos = jmax ((int64) 0, pos - 1024);
 | 
			
		||||
    auto lowestPos = jmax ((int64) 0, pos - 1048576);
 | 
			
		||||
    char buffer[32] = {};
 | 
			
		||||
 | 
			
		||||
    while (pos > lowestPos)
 | 
			
		||||
@ -154,7 +154,7 @@ struct ZipFile::ZipInputStream  : public InputStream
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ~ZipInputStream()
 | 
			
		||||
    ~ZipInputStream() override
 | 
			
		||||
    {
 | 
			
		||||
       #if JUCE_DEBUG
 | 
			
		||||
        if (inputStream != nullptr && inputStream == file.inputStream)
 | 
			
		||||
 | 
			
		||||
@ -224,7 +224,6 @@ public:
 | 
			
		||||
        //==============================================================================
 | 
			
		||||
    private:
 | 
			
		||||
        struct Item;
 | 
			
		||||
        friend struct ContainerDeletePolicy<Item>;
 | 
			
		||||
        OwnedArray<Item> items;
 | 
			
		||||
 | 
			
		||||
        JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Builder)
 | 
			
		||||
@ -244,7 +243,7 @@ private:
 | 
			
		||||
   #if JUCE_DEBUG
 | 
			
		||||
    struct OpenStreamCounter
 | 
			
		||||
    {
 | 
			
		||||
        OpenStreamCounter() {}
 | 
			
		||||
        OpenStreamCounter() = default;
 | 
			
		||||
        ~OpenStreamCounter();
 | 
			
		||||
 | 
			
		||||
        int numOpenStreams = 0;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user