| @@ -33,7 +33,7 @@ | |||||
| */ | */ | ||||
| class ProjectInformationComponent : public Component, | class ProjectInformationComponent : public Component, | ||||
| public ChangeListener, | public ChangeListener, | ||||
| public Button::Listener | |||||
| public ButtonListener | |||||
| { | { | ||||
| public: | public: | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -2902,7 +2902,8 @@ FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() | |||||
| #elif JUCE_WINDOWS | #elif JUCE_WINDOWS | ||||
| const String programFiles (File::getSpecialLocation (File::globalApplicationsDirectory).getFullPathName()); | const String programFiles (File::getSpecialLocation (File::globalApplicationsDirectory).getFullPathName()); | ||||
| return FileSearchPath (programFiles + "\\Steinberg\\VstPlugins"); | |||||
| return FileSearchPath (PlatformUtilities::getRegistryValue ("HKLM\\Software\\VST\\VSTPluginsPath", | |||||
| programFiles + "\\Steinberg\\VstPlugins")); | |||||
| #elif JUCE_LINUX | #elif JUCE_LINUX | ||||
| return FileSearchPath ("/usr/lib/vst"); | return FileSearchPath ("/usr/lib/vst"); | ||||
| #endif | #endif | ||||
| @@ -2912,7 +2913,5 @@ FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch() | |||||
| END_JUCE_NAMESPACE | END_JUCE_NAMESPACE | ||||
| #endif | #endif | ||||
| #undef log | #undef log | ||||
| #endif | #endif | ||||
| @@ -561,7 +561,7 @@ void MidiKeyboardComponent::drawUpDownButton (Graphics& g, int w, int h, | |||||
| case horizontalKeyboard: angle = movesOctavesUp ? 0.0f : 0.5f; break; | case horizontalKeyboard: angle = movesOctavesUp ? 0.0f : 0.5f; break; | ||||
| case verticalKeyboardFacingLeft: angle = movesOctavesUp ? 0.25f : 0.75f; break; | case verticalKeyboardFacingLeft: angle = movesOctavesUp ? 0.25f : 0.75f; break; | ||||
| case verticalKeyboardFacingRight: angle = movesOctavesUp ? 0.75f : 0.25f; break; | case verticalKeyboardFacingRight: angle = movesOctavesUp ? 0.75f : 0.25f; break; | ||||
| default: break; | |||||
| default: jassertfalse; angle = 0; break; | |||||
| } | } | ||||
| Path path; | Path path; | ||||
| @@ -142,7 +142,9 @@ public: | |||||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | ||||
| Array& operator= (Array&& other) noexcept | Array& operator= (Array&& other) noexcept | ||||
| { | { | ||||
| swapWithArray (other); | |||||
| data = static_cast <ArrayAllocationBase<ElementType, TypeOfCriticalSectionToUse>&&> (other.data); | |||||
| numUsed = other.numUsed; | |||||
| other.numUsed = 0; | |||||
| return *this; | return *this; | ||||
| } | } | ||||
| #endif | #endif | ||||
| @@ -53,7 +53,7 @@ public: | |||||
| } | } | ||||
| /** Destructor. */ | /** Destructor. */ | ||||
| ~ArrayAllocationBase() | |||||
| ~ArrayAllocationBase() noexcept | |||||
| { | { | ||||
| } | } | ||||
| @@ -73,6 +73,23 @@ public: | |||||
| clear (true); | clear (true); | ||||
| } | } | ||||
| #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS | |||||
| OwnedArray (OwnedArray&& other) noexcept | |||||
| : data (static_cast <ArrayAllocationBase <ObjectClass*, TypeOfCriticalSectionToUse>&&> (other.data)), | |||||
| numUsed (other.numUsed) | |||||
| { | |||||
| other.numUsed = 0; | |||||
| } | |||||
| OwnedArray& operator= (OwnedArray&& other) noexcept | |||||
| { | |||||
| data = static_cast <ArrayAllocationBase <ObjectClass*, TypeOfCriticalSectionToUse>&&> (other.data); | |||||
| numUsed = other.numUsed; | |||||
| other.numUsed = 0; | |||||
| return *this; | |||||
| } | |||||
| #endif | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Clears the array, optionally deleting the objects inside it first. */ | /** Clears the array, optionally deleting the objects inside it first. */ | ||||
| void clear (const bool deleteObjects = true) | void clear (const bool deleteObjects = true) | ||||
| @@ -446,16 +446,6 @@ public: | |||||
| return CharacterFunctions::compareIgnoreCaseUpTo (*this, other, maxChars); | return CharacterFunctions::compareIgnoreCaseUpTo (*this, other, maxChars); | ||||
| } | } | ||||
| /** Compares this string with another one, up to a specified number of characters. */ | |||||
| int compareIgnoreCaseUpTo (const CharPointer_UTF8& other, const int maxChars) const noexcept | |||||
| { | |||||
| #if JUCE_WINDOWS | |||||
| return strnicmp (data, other.data, (size_t) maxChars); | |||||
| #else | |||||
| return strncasecmp (data, other.data, maxChars); | |||||
| #endif | |||||
| } | |||||
| /** Returns the character index of a substring, or -1 if it isn't found. */ | /** Returns the character index of a substring, or -1 if it isn't found. */ | ||||
| template <typename CharPointer> | template <typename CharPointer> | ||||
| int indexOf (const CharPointer& stringToFind) const noexcept | int indexOf (const CharPointer& stringToFind) const noexcept | ||||
| @@ -232,7 +232,7 @@ void FileChooser::showPlatformDialog (Array<File>& results, const String& title_ | |||||
| HeapBlock<WCHAR> filters; | HeapBlock<WCHAR> filters; | ||||
| filters.calloc (filterSpaceNumChars); | filters.calloc (filterSpaceNumChars); | ||||
| const int bytesWritten = filter.copyToUTF16 (filters.getData(), filterSpaceNumChars * sizeof (WCHAR)); | const int bytesWritten = filter.copyToUTF16 (filters.getData(), filterSpaceNumChars * sizeof (WCHAR)); | ||||
| filter.copyToUTF16 (filters + (bytesWritten / sizeof (WCHAR)) + 1, | |||||
| filter.copyToUTF16 (filters + (bytesWritten / sizeof (WCHAR)), | |||||
| (int) ((filterSpaceNumChars - 1) * sizeof (WCHAR) - bytesWritten)); | (int) ((filterSpaceNumChars - 1) * sizeof (WCHAR) - bytesWritten)); | ||||
| OPENFILENAMEW of = { 0 }; | OPENFILENAMEW of = { 0 }; | ||||