Browse Source

Cleanup

tags/1.9.8
falkTX 7 years ago
parent
commit
6d3db15d8a
32 changed files with 51 additions and 144 deletions
  1. +0
    -22
      source/modules/water/containers/Array.h
  2. +1
    -1
      source/modules/water/containers/ArrayAllocationBase.h
  3. +2
    -2
      source/modules/water/containers/LinkedListPointer.h
  4. +1
    -1
      source/modules/water/containers/OwnedArray.h
  5. +2
    -2
      source/modules/water/files/DirectoryIterator.h
  6. +7
    -7
      source/modules/water/files/File.cpp
  7. +1
    -1
      source/modules/water/files/FileInputStream.h
  8. +1
    -1
      source/modules/water/files/FileOutputStream.h
  9. +1
    -1
      source/modules/water/files/TemporaryFile.h
  10. +1
    -1
      source/modules/water/memory/ByteOrder.h
  11. +1
    -1
      source/modules/water/memory/HeapBlock.h
  12. +0
    -33
      source/modules/water/memory/Memory.h
  13. +2
    -10
      source/modules/water/memory/ReferenceCountedObject.h
  14. +1
    -1
      source/modules/water/midi/MidiBuffer.h
  15. +1
    -1
      source/modules/water/processors/AudioProcessor.h
  16. +11
    -11
      source/modules/water/processors/AudioProcessorGraph.cpp
  17. +3
    -3
      source/modules/water/processors/AudioProcessorGraph.h
  18. +1
    -1
      source/modules/water/streams/FileInputSource.h
  19. +1
    -1
      source/modules/water/streams/InputStream.h
  20. +1
    -1
      source/modules/water/streams/MemoryOutputStream.h
  21. +1
    -1
      source/modules/water/streams/OutputStream.h
  22. +0
    -7
      source/modules/water/text/StringArray.cpp
  23. +0
    -4
      source/modules/water/text/StringArray.h
  24. +1
    -1
      source/modules/water/text/StringPool.h
  25. +2
    -2
      source/modules/water/threads/ChildProcess.cpp
  26. +1
    -1
      source/modules/water/threads/ChildProcess.h
  27. +1
    -1
      source/modules/water/threads/Process.h
  28. +3
    -3
      source/modules/water/threads/ScopedLock.h
  29. +1
    -1
      source/modules/water/threads/SpinLock.h
  30. +0
    -2
      source/modules/water/water.cpp
  31. +1
    -18
      source/modules/water/water.h
  32. +1
    -1
      source/modules/water/xml/XmlDocument.h

+ 0
- 22
source/modules/water/containers/Array.h View File

@@ -111,14 +111,6 @@ public:
new (data.elements + i) ElementType (values[i]);
}
#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS
template <typename TypeToCreateFrom>
Array (const std::initializer_list<TypeToCreateFrom>& items) : numUsed (0)
{
addArray (items);
}
#endif
/** Destructor. */
~Array()
{
@@ -587,20 +579,6 @@ public:
}
}
#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS
template <typename TypeToCreateFrom>
void addArray (const std::initializer_list<TypeToCreateFrom>& items)
{
data.ensureAllocatedSize (numUsed + (int) items.size());
for (auto& item : items)
{
new (data.elements + numUsed) ElementType (item);
++numUsed;
}
}
#endif
/** Adds elements from a null-terminated array of pointers to the end of this array.
@param elementsToAdd an array of pointers to some kind of object from which elements


+ 1
- 1
source/modules/water/containers/ArrayAllocationBase.h View File

@@ -131,7 +131,7 @@ public:
int numAllocated;
private:
JUCE_DECLARE_NON_COPYABLE (ArrayAllocationBase)
CARLA_DECLARE_NON_COPY_CLASS (ArrayAllocationBase)
};
}


+ 2
- 2
source/modules/water/containers/LinkedListPointer.h View File

@@ -357,14 +357,14 @@ public:
private:
LinkedListPointer* endOfList;
JUCE_DECLARE_NON_COPYABLE (Appender)
CARLA_DECLARE_NON_COPY_CLASS (Appender)
};
private:
//==============================================================================
ObjectType* item;
JUCE_DECLARE_NON_COPYABLE (LinkedListPointer)
CARLA_DECLARE_NON_COPY_CLASS (LinkedListPointer)
};
}


+ 1
- 1
source/modules/water/containers/OwnedArray.h View File

@@ -834,7 +834,7 @@ private:
delete data.elements [--numUsed];
}
JUCE_DECLARE_NON_COPYABLE (OwnedArray)
CARLA_DECLARE_NON_COPY_CLASS (OwnedArray)
};
}


+ 2
- 2
source/modules/water/files/DirectoryIterator.h View File

@@ -137,7 +137,7 @@ private:
friend class DirectoryIterator;
ScopedPointer<Pimpl> pimpl;
JUCE_DECLARE_NON_COPYABLE (NativeIterator)
CARLA_DECLARE_NON_COPY_CLASS (NativeIterator)
};
StringArray wildCards;
@@ -154,7 +154,7 @@ private:
static StringArray parseWildcards (const String& pattern);
static bool fileMatches (const StringArray& wildCards, const String& filename);
JUCE_DECLARE_NON_COPYABLE (DirectoryIterator)
CARLA_DECLARE_NON_COPY_CLASS (DirectoryIterator)
};
}


+ 7
- 7
source/modules/water/files/File.cpp View File

@@ -1190,7 +1190,7 @@ private:
const String directoryWithWildCard;
HANDLE handle;
JUCE_DECLARE_NON_COPYABLE (Pimpl)
CARLA_DECLARE_NON_COPY_CLASS (Pimpl)
};
#else
//=====================================================================================================================
@@ -1399,7 +1399,7 @@ File File::getLinkedTarget() const
bool File::copyInternal (const File& dest) const
{
JUCE_AUTORELEASEPOOL
@autoreleasepool
{
NSFileManager* fm = [NSFileManager defaultManager];
@@ -1418,7 +1418,7 @@ bool File::copyInternal (const File& dest) const
File File::getSpecialLocation (const SpecialLocationType type)
{
JUCE_AUTORELEASEPOOL
@autoreleasepool
{
String resultPath;
@@ -1491,7 +1491,7 @@ public:
wildCard (wildCard_),
enumerator (nil)
{
JUCE_AUTORELEASEPOOL
@autoreleasepool
{
enumerator = [[[NSFileManager defaultManager] enumeratorAtPath: juceStringToNS (directory.getFullPathName())] retain];
}
@@ -1506,7 +1506,7 @@ public:
bool* const isDir, bool* const isHidden, int64* const fileSize,
Time* const modTime, Time* const creationTime, bool* const isReadOnly)
{
JUCE_AUTORELEASEPOOL
@autoreleasepool
{
const char* wildcardUTF8 = nullptr;
@@ -1540,7 +1540,7 @@ private:
String parentDir, wildCard;
NSDirectoryEnumerator* enumerator;
JUCE_DECLARE_NON_COPYABLE (Pimpl)
CARLA_DECLARE_NON_COPY_CLASS (Pimpl)
};
#else
static String getLinkedFile (const String& file)
@@ -1689,7 +1689,7 @@ private:
String parentDir, wildCard;
DIR* dir;
JUCE_DECLARE_NON_COPYABLE (Pimpl)
CARLA_DECLARE_NON_COPY_CLASS (Pimpl)
};
#endif
#endif


+ 1
- 1
source/modules/water/files/FileInputStream.h View File

@@ -90,7 +90,7 @@ private:
void openHandle();
size_t readInternal (void*, size_t);
JUCE_DECLARE_NON_COPYABLE (FileInputStream)
CARLA_DECLARE_NON_COPY_CLASS (FileInputStream)
};
}


+ 1
- 1
source/modules/water/files/FileOutputStream.h View File

@@ -116,7 +116,7 @@ private:
int64 setPositionInternal (int64);
ssize_t writeInternal (const void*, size_t);
JUCE_DECLARE_NON_COPYABLE (FileOutputStream)
CARLA_DECLARE_NON_COPY_CLASS (FileOutputStream)
};
}


+ 1
- 1
source/modules/water/files/TemporaryFile.h View File

@@ -164,7 +164,7 @@ private:
//==============================================================================
const File temporaryFile, targetFile;
JUCE_DECLARE_NON_COPYABLE (TemporaryFile)
CARLA_DECLARE_NON_COPY_CLASS (TemporaryFile)
};
}


+ 1
- 1
source/modules/water/memory/ByteOrder.h View File

@@ -135,7 +135,7 @@ public:
private:
ByteOrder() JUCE_DELETED_FUNCTION;
JUCE_DECLARE_NON_COPYABLE (ByteOrder)
CARLA_DECLARE_NON_COPY_CLASS (ByteOrder)
};


+ 1
- 1
source/modules/water/memory/HeapBlock.h View File

@@ -305,7 +305,7 @@ private:
}
#if ! (defined (JUCE_DLL) || defined (JUCE_DLL_BUILD))
JUCE_DECLARE_NON_COPYABLE (HeapBlock)
CARLA_DECLARE_NON_COPY_CLASS (HeapBlock)
JUCE_PREVENT_HEAP_ALLOCATION // Creating a 'new HeapBlock' would be missing the point!
#endif
};


+ 0
- 33
source/modules/water/memory/Memory.h View File

@@ -83,39 +83,6 @@ inline void writeUnaligned (void* dstPtr, Type value) noexcept
memcpy (dstPtr, &value, sizeof(Type));
}
//==============================================================================
#if JUCE_MAC
/** A handy C++ wrapper that creates and deletes an NSAutoreleasePool object using RAII.
You should use the JUCE_AUTORELEASEPOOL macro to create a local auto-release pool on the stack.
*/
class ScopedAutoReleasePool
{
public:
ScopedAutoReleasePool();
~ScopedAutoReleasePool();
private:
void* pool;
JUCE_DECLARE_NON_COPYABLE (ScopedAutoReleasePool)
};
/** A macro that can be used to easily declare a local ScopedAutoReleasePool
object for RAII-based obj-C autoreleasing.
Because this may use the \@autoreleasepool syntax, you must follow the macro with
a set of braces to mark the scope of the pool.
*/
#if (JUCE_COMPILER_SUPPORTS_ARC && defined (__OBJC__))
#define JUCE_AUTORELEASEPOOL @autoreleasepool
#else
#define JUCE_AUTORELEASEPOOL const water::ScopedAutoReleasePool JUCE_JOIN_MACRO (autoReleasePool_, __LINE__);
#endif
#else
#define JUCE_AUTORELEASEPOOL
#endif
}
#endif // JUCE_MEMORY_H_INCLUDED

+ 2
- 10
source/modules/water/memory/ReferenceCountedObject.h View File

@@ -125,7 +125,7 @@ private:
//==============================================================================
Atomic <int> refCount;
JUCE_DECLARE_NON_COPYABLE (ReferenceCountedObject)
CARLA_DECLARE_NON_COPY_CLASS (ReferenceCountedObject)
};
@@ -195,7 +195,7 @@ private:
//==============================================================================
int refCount;
JUCE_DECLARE_NON_COPYABLE (SingleThreadedReferenceCountedObject)
CARLA_DECLARE_NON_COPY_CLASS (SingleThreadedReferenceCountedObject)
};
@@ -244,14 +244,6 @@ public:
incIfNotNull (refCountedObject);
}
#if JUCE_COMPILER_SUPPORTS_NULLPTR
/** Creates a pointer to a null object. */
ReferenceCountedObjectPtr (decltype (nullptr)) noexcept
: referencedObject (nullptr)
{
}
#endif
/** Copies another pointer.
This will increment the object's reference-count.
*/


+ 1
- 1
source/modules/water/midi/MidiBuffer.h View File

@@ -222,7 +222,7 @@ public:
const MidiBuffer& buffer;
const uint8* data;
JUCE_DECLARE_NON_COPYABLE (Iterator)
CARLA_DECLARE_NON_COPY_CLASS (Iterator)
};
/** The raw data holding this buffer.


+ 1
- 1
source/modules/water/processors/AudioProcessor.h View File

@@ -384,7 +384,7 @@ private:
void processBypassed (AudioSampleBuffer&, MidiBuffer&);
JUCE_DECLARE_NON_COPYABLE (AudioProcessor)
CARLA_DECLARE_NON_COPY_CLASS (AudioProcessor)
};
}


+ 11
- 11
source/modules/water/processors/AudioProcessorGraph.cpp View File

@@ -68,7 +68,7 @@ struct ClearChannelOp : public AudioGraphRenderingOp<ClearChannelOp>
const int channelNum;
JUCE_DECLARE_NON_COPYABLE (ClearChannelOp)
CARLA_DECLARE_NON_COPY_CLASS (ClearChannelOp)
};
//==============================================================================
@@ -85,7 +85,7 @@ struct CopyChannelOp : public AudioGraphRenderingOp<CopyChannelOp>
const int srcChannelNum, dstChannelNum;
JUCE_DECLARE_NON_COPYABLE (CopyChannelOp)
CARLA_DECLARE_NON_COPY_CLASS (CopyChannelOp)
};
//==============================================================================
@@ -102,7 +102,7 @@ struct AddChannelOp : public AudioGraphRenderingOp<AddChannelOp>
const int srcChannelNum, dstChannelNum;
JUCE_DECLARE_NON_COPYABLE (AddChannelOp)
CARLA_DECLARE_NON_COPY_CLASS (AddChannelOp)
};
//==============================================================================
@@ -117,7 +117,7 @@ struct ClearMidiBufferOp : public AudioGraphRenderingOp<ClearMidiBufferOp>
const int bufferNum;
JUCE_DECLARE_NON_COPYABLE (ClearMidiBufferOp)
CARLA_DECLARE_NON_COPY_CLASS (ClearMidiBufferOp)
};
//==============================================================================
@@ -134,7 +134,7 @@ struct CopyMidiBufferOp : public AudioGraphRenderingOp<CopyMidiBufferOp>
const int srcBufferNum, dstBufferNum;
JUCE_DECLARE_NON_COPYABLE (CopyMidiBufferOp)
CARLA_DECLARE_NON_COPY_CLASS (CopyMidiBufferOp)
};
//==============================================================================
@@ -152,7 +152,7 @@ struct AddMidiBufferOp : public AudioGraphRenderingOp<AddMidiBufferOp>
const int srcBufferNum, dstBufferNum;
JUCE_DECLARE_NON_COPYABLE (AddMidiBufferOp)
CARLA_DECLARE_NON_COPY_CLASS (AddMidiBufferOp)
};
//==============================================================================
@@ -186,7 +186,7 @@ private:
const int channel, bufferSize;
int readIndex, writeIndex;
JUCE_DECLARE_NON_COPYABLE (DelayChannelOp)
CARLA_DECLARE_NON_COPY_CLASS (DelayChannelOp)
};
//==============================================================================
@@ -244,7 +244,7 @@ private:
const int totalChans;
const int midiBufferToUse;
JUCE_DECLARE_NON_COPYABLE (ProcessBufferOp)
CARLA_DECLARE_NON_COPY_CLASS (ProcessBufferOp)
};
//==============================================================================
@@ -742,7 +742,7 @@ private:
}
}
JUCE_DECLARE_NON_COPYABLE (RenderingOpSequenceCalculator)
CARLA_DECLARE_NON_COPY_CLASS (RenderingOpSequenceCalculator)
};
//==============================================================================
@@ -784,7 +784,7 @@ private:
const uint32 destNodeId;
SortedSet<uint32> srcNodes;
JUCE_DECLARE_NON_COPYABLE (Entry)
CARLA_DECLARE_NON_COPY_CLASS (Entry)
};
OwnedArray<Entry> entries;
@@ -853,7 +853,7 @@ private:
return result;
}
JUCE_DECLARE_NON_COPYABLE (ConnectionLookupTable)
CARLA_DECLARE_NON_COPY_CLASS (ConnectionLookupTable)
};
//==============================================================================


+ 3
- 3
source/modules/water/processors/AudioProcessorGraph.h View File

@@ -102,7 +102,7 @@ public:
void prepare (double newSampleRate, int newBlockSize, AudioProcessorGraph*);
void unprepare();
JUCE_DECLARE_NON_COPYABLE (Node)
CARLA_DECLARE_NON_COPY_CLASS (Node)
};
//==============================================================================
@@ -334,7 +334,7 @@ public:
//==============================================================================
void processAudio (AudioSampleBuffer& buffer, MidiBuffer& midiMessages);
JUCE_DECLARE_NON_COPYABLE (AudioGraphIOProcessor)
CARLA_DECLARE_NON_COPY_CLASS (AudioGraphIOProcessor)
};
//==============================================================================
@@ -377,7 +377,7 @@ private:
void buildRenderingSequence();
bool isAnInputTo (uint32 possibleInputId, uint32 possibleDestinationId, int recursionCheck) const;
JUCE_DECLARE_NON_COPYABLE (AudioProcessorGraph)
CARLA_DECLARE_NON_COPY_CLASS (AudioProcessorGraph)
};
}


+ 1
- 1
source/modules/water/streams/FileInputSource.h View File

@@ -60,7 +60,7 @@ private:
const File file;
bool useFileTimeInHashGeneration;
JUCE_DECLARE_NON_COPYABLE (FileInputSource)
CARLA_DECLARE_NON_COPY_CLASS (FileInputSource)
};
}


+ 1
- 1
source/modules/water/streams/InputStream.h View File

@@ -260,7 +260,7 @@ protected:
InputStream() noexcept {}
private:
JUCE_DECLARE_NON_COPYABLE (InputStream)
CARLA_DECLARE_NON_COPY_CLASS (InputStream)
};
}


+ 1
- 1
source/modules/water/streams/MemoryOutputStream.h View File

@@ -130,7 +130,7 @@ private:
void trimExternalBlockSize();
char* prepareToWrite (size_t);
JUCE_DECLARE_NON_COPYABLE (MemoryOutputStream)
CARLA_DECLARE_NON_COPY_CLASS (MemoryOutputStream)
};
/** Copies all the data that has been written to a MemoryOutputStream into another stream. */


+ 1
- 1
source/modules/water/streams/OutputStream.h View File

@@ -236,7 +236,7 @@ private:
//==============================================================================
String newLineString;
JUCE_DECLARE_NON_COPYABLE (OutputStream)
CARLA_DECLARE_NON_COPY_CLASS (OutputStream)
};
//==============================================================================


+ 0
- 7
source/modules/water/text/StringArray.cpp View File

@@ -77,13 +77,6 @@ StringArray& StringArray::operator= (StringArray&& other) noexcept
}
#endif
#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS
StringArray::StringArray (const std::initializer_list<const char*>& stringList)
{
strings.addArray (stringList);
}
#endif
StringArray::~StringArray()
{
}


+ 0
- 4
source/modules/water/text/StringArray.h View File

@@ -74,10 +74,6 @@ public:
*/
explicit StringArray (const char* const* strings);
#if JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS
StringArray (const std::initializer_list<const char*>& strings);
#endif
/** Destructor. */
~StringArray();


+ 1
- 1
source/modules/water/text/StringPool.h View File

@@ -89,7 +89,7 @@ private:
void garbageCollectIfNeeded();
JUCE_DECLARE_NON_COPYABLE (StringPool)
CARLA_DECLARE_NON_COPY_CLASS (StringPool)
};
}


+ 2
- 2
source/modules/water/threads/ChildProcess.cpp View File

@@ -140,7 +140,7 @@ private:
HANDLE readPipe, writePipe;
PROCESS_INFORMATION processInfo;
JUCE_DECLARE_NON_COPYABLE (ActiveProcess)
CARLA_DECLARE_NON_COPY_CLASS (ActiveProcess)
};
#else
class ChildProcess::ActiveProcess
@@ -281,7 +281,7 @@ private:
int pipeHandle;
FILE* readHandle;
JUCE_DECLARE_NON_COPYABLE (ActiveProcess)
CARLA_DECLARE_NON_COPY_CLASS (ActiveProcess)
};
#endif


+ 1
- 1
source/modules/water/threads/ChildProcess.h View File

@@ -115,7 +115,7 @@ private:
class ActiveProcess;
ScopedPointer<ActiveProcess> activeProcess;
JUCE_DECLARE_NON_COPYABLE (ChildProcess)
CARLA_DECLARE_NON_COPY_CLASS (ChildProcess)
};
}


+ 1
- 1
source/modules/water/threads/Process.h View File

@@ -140,7 +140,7 @@ public:
private:
Process();
JUCE_DECLARE_NON_COPYABLE (Process)
CARLA_DECLARE_NON_COPY_CLASS (Process)
};
}


+ 3
- 3
source/modules/water/threads/ScopedLock.h View File

@@ -82,7 +82,7 @@ private:
//==============================================================================
const LockType& lock_;
JUCE_DECLARE_NON_COPYABLE (GenericScopedLock)
CARLA_DECLARE_NON_COPY_CLASS (GenericScopedLock)
};
@@ -155,7 +155,7 @@ private:
//==============================================================================
const LockType& lock_;
JUCE_DECLARE_NON_COPYABLE (GenericScopedUnlock)
CARLA_DECLARE_NON_COPY_CLASS (GenericScopedUnlock)
};
@@ -230,7 +230,7 @@ private:
const LockType& lock_;
const bool lockWasSuccessful;
JUCE_DECLARE_NON_COPYABLE (GenericScopedTryLock)
CARLA_DECLARE_NON_COPY_CLASS (GenericScopedTryLock)
};
}


+ 1
- 1
source/modules/water/threads/SpinLock.h View File

@@ -101,7 +101,7 @@ private:
//==============================================================================
mutable Atomic<int> lock;
JUCE_DECLARE_NON_COPYABLE (SpinLock)
CARLA_DECLARE_NON_COPY_CLASS (SpinLock)
};
}


+ 0
- 2
source/modules/water/water.cpp View File

@@ -44,8 +44,6 @@
#endif
#endif
// #include <wctype.h>
#include "misc/Result.h"
//==============================================================================


+ 1
- 18
source/modules/water/water.h View File

@@ -35,25 +35,17 @@
#endif
//==============================================================================
// Compiler support
#if (__cplusplus >= 201103L || defined (__GXX_EXPERIMENTAL_CXX0X__)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 405
#define JUCE_COMPILER_SUPPORTS_NULLPTR 1
#define JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS 1
#define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1
#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && ! defined (JUCE_DELETED_FUNCTION)
#define JUCE_DELETED_FUNCTION = delete
#endif
#endif
//==============================================================================
// Clang
#if __clang__
#if __has_feature (cxx_nullptr)
#define JUCE_COMPILER_SUPPORTS_NULLPTR 1
#endif
#if __has_feature (cxx_rvalue_references)
#define JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS 1
#endif
@@ -62,14 +54,6 @@
#define JUCE_DELETED_FUNCTION = delete
#endif
#if __has_feature (cxx_generalized_initializers) && (defined (_LIBCPP_VERSION) || ! (JUCE_MAC || JUCE_IOS))
#define JUCE_COMPILER_SUPPORTS_INITIALIZER_LISTS 1
#endif
#ifndef JUCE_COMPILER_SUPPORTS_ARC
#define JUCE_COMPILER_SUPPORTS_ARC 1
#endif
#ifndef JUCE_EXCEPTIONS_DISABLED
#if ! __has_feature (cxx_exceptions)
#define JUCE_EXCEPTIONS_DISABLED 1
@@ -90,7 +74,6 @@
#define JUCE_DELETED_FUNCTION
#endif
#define JUCE_DECLARE_NON_COPYABLE(className) CARLA_DECLARE_NON_COPY_CLASS(className)
#define JUCE_PREVENT_HEAP_ALLOCATION CARLA_PREVENT_HEAP_ALLOCATION
#define NEEDS_TRANS(x) (x)


+ 1
- 1
source/modules/water/xml/XmlDocument.h View File

@@ -176,7 +176,7 @@ private:
String expandExternalEntity (const String&);
String getParameterEntity (const String&);
JUCE_DECLARE_NON_COPYABLE (XmlDocument)
CARLA_DECLARE_NON_COPY_CLASS (XmlDocument)
};
}


Loading…
Cancel
Save