mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed an obscure utf8 string comparison problem. Added a few C++11 tweaks. Improved VST host default folder detection. Win32 file browser filter fix. Introjucer VS2005 compiler bug workaround.
This commit is contained in:
parent
4846cbe046
commit
1a5bdda7f1
8 changed files with 26 additions and 18 deletions
|
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
class ProjectInformationComponent : public Component,
|
||||
public ChangeListener,
|
||||
public Button::Listener
|
||||
public ButtonListener
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -2902,7 +2902,8 @@ FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch()
|
|||
#elif JUCE_WINDOWS
|
||||
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
|
||||
return FileSearchPath ("/usr/lib/vst");
|
||||
#endif
|
||||
|
|
@ -2912,7 +2913,5 @@ FileSearchPath VSTPluginFormat::getDefaultLocationsToSearch()
|
|||
END_JUCE_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
||||
#undef log
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -561,7 +561,7 @@ void MidiKeyboardComponent::drawUpDownButton (Graphics& g, int w, int h,
|
|||
case horizontalKeyboard: angle = movesOctavesUp ? 0.0f : 0.5f; break;
|
||||
case verticalKeyboardFacingLeft: angle = movesOctavesUp ? 0.25f : 0.75f; break;
|
||||
case verticalKeyboardFacingRight: angle = movesOctavesUp ? 0.75f : 0.25f; break;
|
||||
default: break;
|
||||
default: jassertfalse; angle = 0; break;
|
||||
}
|
||||
|
||||
Path path;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,9 @@ public:
|
|||
#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS
|
||||
Array& operator= (Array&& other) noexcept
|
||||
{
|
||||
swapWithArray (other);
|
||||
data = static_cast <ArrayAllocationBase<ElementType, TypeOfCriticalSectionToUse>&&> (other.data);
|
||||
numUsed = other.numUsed;
|
||||
other.numUsed = 0;
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
}
|
||||
|
||||
/** Destructor. */
|
||||
~ArrayAllocationBase()
|
||||
~ArrayAllocationBase() noexcept
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,23 @@ public:
|
|||
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. */
|
||||
void clear (const bool deleteObjects = true)
|
||||
|
|
|
|||
|
|
@ -446,16 +446,6 @@ public:
|
|||
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. */
|
||||
template <typename CharPointer>
|
||||
int indexOf (const CharPointer& stringToFind) const noexcept
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ void FileChooser::showPlatformDialog (Array<File>& results, const String& title_
|
|||
HeapBlock<WCHAR> filters;
|
||||
filters.calloc (filterSpaceNumChars);
|
||||
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));
|
||||
|
||||
OPENFILENAMEW of = { 0 };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue