| @@ -2531,7 +2531,7 @@ bool shutdownModule() | |||||
| //============================================================================== | //============================================================================== | ||||
| /** This typedef represents VST3's createInstance() function signature */ | /** This typedef represents VST3's createInstance() function signature */ | ||||
| typedef FUnknown* (*CreateFunction) (Vst::IHostApplication*); | |||||
| using CreateFunction = FUnknown* (*)(Vst::IHostApplication*); | |||||
| static FUnknown* createComponentInstance (Vst::IHostApplication* host) | static FUnknown* createComponentInstance (Vst::IHostApplication* host) | ||||
| { | { | ||||
| @@ -1142,7 +1142,7 @@ private: | |||||
| if (CFBundleLoadExecutableAndReturnError (bundleRef, &error)) | if (CFBundleLoadExecutableAndReturnError (bundleRef, &error)) | ||||
| { | { | ||||
| typedef bool (*BundleEntryProc)(CFBundleRef); | |||||
| using BundleEntryProc = bool (*)(CFBundleRef); | |||||
| if (auto proc = (BundleEntryProc) getFunction ("bundleEntry")) | if (auto proc = (BundleEntryProc) getFunction ("bundleEntry")) | ||||
| { | { | ||||
| @@ -226,7 +226,7 @@ static pointer_sized_int VSTINTERFACECALL audioMaster (VstEffectInterface*, int3 | |||||
| namespace | namespace | ||||
| { | { | ||||
| typedef void (*EventProcPtr) (XEvent* ev); | |||||
| using EventProcPtr = void (*)(XEvent*); | |||||
| Window getChildWindow (Window windowToCheck) | Window getChildWindow (Window windowToCheck) | ||||
| { | { | ||||
| @@ -354,7 +354,7 @@ public: | |||||
| inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return lock; } | inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return lock; } | ||||
| /** Returns the type of scoped lock to use for locking this array */ | /** Returns the type of scoped lock to use for locking this array */ | ||||
| typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType; | |||||
| using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType; | |||||
| private: | private: | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -42,7 +42,7 @@ using uint16 = unsigned short; | |||||
| /** A platform-independent 32-bit signed integer type. */ | /** A platform-independent 32-bit signed integer type. */ | ||||
| using int32 = signed int; | using int32 = signed int; | ||||
| /** A platform-independent 32-bit unsigned integer type. */ | /** A platform-independent 32-bit unsigned integer type. */ | ||||
| typedef unsigned int uint32; | |||||
| using uint32 = unsigned int; | |||||
| #if JUCE_MSVC | #if JUCE_MSVC | ||||
| /** A platform-independent 64-bit integer type. */ | /** A platform-independent 64-bit integer type. */ | ||||
| @@ -40,7 +40,7 @@ namespace juce | |||||
| template <typename Type> | template <typename Type> | ||||
| struct Atomic final | struct Atomic final | ||||
| { | { | ||||
| typedef typename AtomicHelpers::DiffTypeHelper<Type>::Type DiffType; | |||||
| using DiffType = typename AtomicHelpers::DiffTypeHelper<Type>::Type; | |||||
| /** Creates a new value, initialised to zero. */ | /** Creates a new value, initialised to zero. */ | ||||
| Atomic() noexcept : value (0) {} | Atomic() noexcept : value (0) {} | ||||
| @@ -183,7 +183,7 @@ private: | |||||
| @see CriticalSection, ScopedUnlock | @see CriticalSection, ScopedUnlock | ||||
| */ | */ | ||||
| typedef CriticalSection::ScopedLockType ScopedLock; | |||||
| using ScopedLock = CriticalSection::ScopedLockType; | |||||
| //============================================================================== | //============================================================================== | ||||
| /** | /** | ||||
| @@ -223,7 +223,7 @@ typedef CriticalSection::ScopedLockType ScopedLock; | |||||
| @see CriticalSection, ScopedLock | @see CriticalSection, ScopedLock | ||||
| */ | */ | ||||
| typedef CriticalSection::ScopedUnlockType ScopedUnlock; | |||||
| using ScopedUnlock = CriticalSection::ScopedUnlockType; | |||||
| //============================================================================== | //============================================================================== | ||||
| /** | /** | ||||
| @@ -257,6 +257,6 @@ typedef CriticalSection::ScopedUnlockType ScopedUnlock; | |||||
| @see CriticalSection::tryEnter, ScopedLock, ScopedUnlock, ScopedReadLock | @see CriticalSection::tryEnter, ScopedLock, ScopedUnlock, ScopedReadLock | ||||
| */ | */ | ||||
| typedef CriticalSection::ScopedTryLockType ScopedTryLock; | |||||
| using ScopedTryLock = CriticalSection::ScopedTryLockType; | |||||
| } // namespace juce | } // namespace juce | ||||
| @@ -54,7 +54,7 @@ private: | |||||
| template <typename Scalar> | template <typename Scalar> | ||||
| struct CmplxSIMDOps | struct CmplxSIMDOps | ||||
| { | { | ||||
| typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType; | |||||
| using vSIMDType = typename SIMDNativeOps<Scalar>::vSIMDType; | |||||
| static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const Scalar* a) noexcept | static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const Scalar* a) noexcept | ||||
| { | { | ||||
| @@ -101,7 +101,7 @@ struct CmplxSIMDOps | |||||
| template <typename Scalar> | template <typename Scalar> | ||||
| struct CmplxSIMDOps<std::complex<Scalar>> | struct CmplxSIMDOps<std::complex<Scalar>> | ||||
| { | { | ||||
| typedef typename SIMDNativeOps<Scalar>::vSIMDType vSIMDType; | |||||
| using vSIMDType = typename SIMDNativeOps<Scalar>::vSIMDType; | |||||
| static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const std::complex<Scalar>* a) noexcept | static inline vSIMDType JUCE_VECTOR_CALLTYPE load (const std::complex<Scalar>* a) noexcept | ||||
| { | { | ||||
| @@ -35,7 +35,7 @@ class OpenGLContext; | |||||
| //============================================================================== | //============================================================================== | ||||
| /** See MessageManager::callFunctionOnMessageThread() for use of this function type. */ | /** See MessageManager::callFunctionOnMessageThread() for use of this function type. */ | ||||
| typedef void* (MessageCallbackFunction) (void* userData); | |||||
| using MessageCallbackFunction = void* (void* userData); | |||||
| //============================================================================== | //============================================================================== | ||||
| @@ -23,13 +23,13 @@ | |||||
| namespace juce | namespace juce | ||||
| { | { | ||||
| typedef void (*AppFocusChangeCallback)(); | |||||
| using AppFocusChangeCallback = void (*)(); | |||||
| AppFocusChangeCallback appFocusChangeCallback = nullptr; | AppFocusChangeCallback appFocusChangeCallback = nullptr; | ||||
| typedef bool (*CheckEventBlockedByModalComps) (NSEvent*); | |||||
| using CheckEventBlockedByModalComps = bool (*)(NSEvent*); | |||||
| CheckEventBlockedByModalComps isEventBlockedByModalComps = nullptr; | CheckEventBlockedByModalComps isEventBlockedByModalComps = nullptr; | ||||
| typedef void (*MenuTrackingChangedCallback)(bool); | |||||
| using MenuTrackingChangedCallback = void (*)(bool); | |||||
| MenuTrackingChangedCallback menuTrackingChangedCallback = nullptr; | MenuTrackingChangedCallback menuTrackingChangedCallback = nullptr; | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -25,10 +25,10 @@ namespace juce | |||||
| extern HWND juce_messageWindowHandle; | extern HWND juce_messageWindowHandle; | ||||
| typedef bool (*CheckEventBlockedByModalComps) (const MSG&); | |||||
| using CheckEventBlockedByModalComps = bool (*)(const MSG&); | |||||
| CheckEventBlockedByModalComps isEventBlockedByModalComps = nullptr; | CheckEventBlockedByModalComps isEventBlockedByModalComps = nullptr; | ||||
| typedef void (*SettingChangeCallbackFunc) (void); | |||||
| using SettingChangeCallbackFunc = void (*)(void); | |||||
| SettingChangeCallbackFunc settingChangeCallback = nullptr; | SettingChangeCallbackFunc settingChangeCallback = nullptr; | ||||
| #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client && JucePlugin_Build_Unity | #if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client && JucePlugin_Build_Unity | ||||
| @@ -72,7 +72,7 @@ namespace WindowsMessageHelpers | |||||
| return TRUE; | return TRUE; | ||||
| } | } | ||||
| void handleBroadcastMessage (const COPYDATASTRUCT* const data) | |||||
| void handleBroadcastMessage (const COPYDATASTRUCT* data) | |||||
| { | { | ||||
| if (data != nullptr && data->dwData == broadcastMessageMagicNumber) | if (data != nullptr && data->dwData == broadcastMessageMagicNumber) | ||||
| { | { | ||||
| @@ -91,7 +91,7 @@ namespace WindowsMessageHelpers | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| LRESULT CALLBACK messageWndProc (HWND h, const UINT message, const WPARAM wParam, const LPARAM lParam) noexcept | |||||
| LRESULT CALLBACK messageWndProc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) noexcept | |||||
| { | { | ||||
| if (h == juce_messageWindowHandle) | if (h == juce_messageWindowHandle) | ||||
| { | { | ||||
| @@ -108,11 +108,10 @@ namespace WindowsMessageHelpers | |||||
| handleBroadcastMessage (reinterpret_cast<const COPYDATASTRUCT*> (lParam)); | handleBroadcastMessage (reinterpret_cast<const COPYDATASTRUCT*> (lParam)); | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| else if (message == WM_SETTINGCHANGE) | |||||
| { | |||||
| if (message == WM_SETTINGCHANGE) | |||||
| if (settingChangeCallback != nullptr) | if (settingChangeCallback != nullptr) | ||||
| settingChangeCallback(); | settingChangeCallback(); | ||||
| } | |||||
| } | } | ||||
| return DefWindowProc (h, message, wParam, lParam); | return DefWindowProc (h, message, wParam, lParam); | ||||
| @@ -124,7 +123,7 @@ LRESULT juce_offerEventToActiveXControl (::MSG&); | |||||
| #endif | #endif | ||||
| //============================================================================== | //============================================================================== | ||||
| bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPendingMessages) | |||||
| bool MessageManager::dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages) | |||||
| { | { | ||||
| using namespace WindowsMessageHelpers; | using namespace WindowsMessageHelpers; | ||||
| MSG m; | MSG m; | ||||
| @@ -134,10 +133,10 @@ bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPend | |||||
| if (GetMessage (&m, (HWND) 0, 0, 0) >= 0) | if (GetMessage (&m, (HWND) 0, 0, 0) >= 0) | ||||
| { | { | ||||
| #if JUCE_MODULE_AVAILABLE_juce_gui_extra | |||||
| #if JUCE_MODULE_AVAILABLE_juce_gui_extra | |||||
| if (juce_offerEventToActiveXControl (m) != S_FALSE) | if (juce_offerEventToActiveXControl (m) != S_FALSE) | ||||
| return true; | return true; | ||||
| #endif | |||||
| #endif | |||||
| if (m.message == customMessageID && m.hwnd == juce_messageWindowHandle) | if (m.message == customMessageID && m.hwnd == juce_messageWindowHandle) | ||||
| { | { | ||||
| @@ -40,7 +40,7 @@ namespace FontValues | |||||
| String fallbackFontStyle; | String fallbackFontStyle; | ||||
| } | } | ||||
| typedef Typeface::Ptr (*GetTypefaceForFont) (const Font&); | |||||
| using GetTypefaceForFont = Typeface::Ptr (*)(const Font&); | |||||
| GetTypefaceForFont juce_getTypefaceForFont = nullptr; | GetTypefaceForFont juce_getTypefaceForFont = nullptr; | ||||
| float Font::getDefaultMinimumHorizontalScaleFactor() noexcept { return FontValues::minimumHorizontalScale; } | float Font::getDefaultMinimumHorizontalScaleFactor() noexcept { return FontValues::minimumHorizontalScale; } | ||||
| @@ -32,7 +32,7 @@ static Typeface::Ptr getTypefaceForFontFromLookAndFeel (const Font& font) | |||||
| return LookAndFeel::getDefaultLookAndFeel().getTypefaceForFont (font); | return LookAndFeel::getDefaultLookAndFeel().getTypefaceForFont (font); | ||||
| } | } | ||||
| typedef Typeface::Ptr (*GetTypefaceForFont) (const Font&); | |||||
| using GetTypefaceForFont = Typeface::Ptr (*)(const Font&); | |||||
| extern GetTypefaceForFont juce_getTypefaceForFont; | extern GetTypefaceForFont juce_getTypefaceForFont; | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -765,7 +765,7 @@ const PopupMenu* MenuBarModel::getMacExtraAppleItemsMenu() | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| typedef void (*MenuTrackingChangedCallback) (bool); | |||||
| using MenuTrackingChangedCallback = void (*)(bool); | |||||
| extern MenuTrackingChangedCallback menuTrackingChangedCallback; | extern MenuTrackingChangedCallback menuTrackingChangedCallback; | ||||
| static void mainMenuTrackingChanged (bool isTracking) | static void mainMenuTrackingChanged (bool isTracking) | ||||
| @@ -204,17 +204,13 @@ namespace LiveConstantEditor | |||||
| LiveValue<Type>& getValue (const char* file, int line, const Type& initialValue) | LiveValue<Type>& getValue (const char* file, int line, const Type& initialValue) | ||||
| { | { | ||||
| const ScopedLock sl (lock); | const ScopedLock sl (lock); | ||||
| typedef LiveValue<Type> ValueType; | |||||
| for (int i = 0; i < values.size(); ++i) | |||||
| { | |||||
| LiveValueBase* v = values.getUnchecked(i); | |||||
| using ValueType = LiveValue<Type>; | |||||
| for (auto* v : values) | |||||
| if (v->sourceLine == line && v->sourceFile == file) | if (v->sourceLine == line && v->sourceFile == file) | ||||
| return *static_cast<ValueType*> (v); | return *static_cast<ValueType*> (v); | ||||
| } | |||||
| ValueType* v = new ValueType (file, line, initialValue); | |||||
| auto v = new ValueType (file, line, initialValue); | |||||
| addValue (v); | addValue (v); | ||||
| return *v; | return *v; | ||||
| } | } | ||||
| @@ -30,11 +30,11 @@ namespace juce | |||||
| //============================================================================== | //============================================================================== | ||||
| /** The type used for OSC type tags. */ | /** The type used for OSC type tags. */ | ||||
| typedef char OSCType; | |||||
| using OSCType = char; | |||||
| /** The type used for OSC type tag strings. */ | /** The type used for OSC type tag strings. */ | ||||
| typedef Array<OSCType> OSCTypeList; | |||||
| using OSCTypeList = Array<OSCType>; | |||||
| //============================================================================== | //============================================================================== | ||||