mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Tidied up some more old typedefs
This commit is contained in:
parent
f3e1e52c88
commit
87042769b6
16 changed files with 32 additions and 37 deletions
|
|
@ -2531,7 +2531,7 @@ bool shutdownModule()
|
|||
|
||||
//==============================================================================
|
||||
/** This typedef represents VST3's createInstance() function signature */
|
||||
typedef FUnknown* (*CreateFunction) (Vst::IHostApplication*);
|
||||
using CreateFunction = FUnknown* (*)(Vst::IHostApplication*);
|
||||
|
||||
static FUnknown* createComponentInstance (Vst::IHostApplication* host)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1142,7 +1142,7 @@ private:
|
|||
|
||||
if (CFBundleLoadExecutableAndReturnError (bundleRef, &error))
|
||||
{
|
||||
typedef bool (*BundleEntryProc)(CFBundleRef);
|
||||
using BundleEntryProc = bool (*)(CFBundleRef);
|
||||
|
||||
if (auto proc = (BundleEntryProc) getFunction ("bundleEntry"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ static pointer_sized_int VSTINTERFACECALL audioMaster (VstEffectInterface*, int3
|
|||
|
||||
namespace
|
||||
{
|
||||
typedef void (*EventProcPtr) (XEvent* ev);
|
||||
using EventProcPtr = void (*)(XEvent*);
|
||||
|
||||
Window getChildWindow (Window windowToCheck)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ public:
|
|||
inline const TypeOfCriticalSectionToUse& getLock() const noexcept { return lock; }
|
||||
|
||||
/** Returns the type of scoped lock to use for locking this array */
|
||||
typedef typename TypeOfCriticalSectionToUse::ScopedLockType ScopedLockType;
|
||||
using ScopedLockType = typename TypeOfCriticalSectionToUse::ScopedLockType;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ using uint16 = unsigned short;
|
|||
/** A platform-independent 32-bit signed integer type. */
|
||||
using int32 = signed int;
|
||||
/** A platform-independent 32-bit unsigned integer type. */
|
||||
typedef unsigned int uint32;
|
||||
using uint32 = unsigned int;
|
||||
|
||||
#if JUCE_MSVC
|
||||
/** A platform-independent 64-bit integer type. */
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace juce
|
|||
template <typename Type>
|
||||
struct Atomic final
|
||||
{
|
||||
typedef typename AtomicHelpers::DiffTypeHelper<Type>::Type DiffType;
|
||||
using DiffType = typename AtomicHelpers::DiffTypeHelper<Type>::Type;
|
||||
|
||||
/** Creates a new value, initialised to zero. */
|
||||
Atomic() noexcept : value (0) {}
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ private:
|
|||
|
||||
@see CriticalSection, ScopedUnlock
|
||||
*/
|
||||
typedef CriticalSection::ScopedLockType ScopedLock;
|
||||
using ScopedLock = CriticalSection::ScopedLockType;
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
|
|
@ -223,7 +223,7 @@ typedef CriticalSection::ScopedLockType 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
|
||||
*/
|
||||
typedef CriticalSection::ScopedTryLockType ScopedTryLock;
|
||||
using ScopedTryLock = CriticalSection::ScopedTryLockType;
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ private:
|
|||
template <typename Scalar>
|
||||
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
|
||||
{
|
||||
|
|
@ -101,7 +101,7 @@ struct CmplxSIMDOps
|
|||
template <typename 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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class OpenGLContext;
|
|||
|
||||
//==============================================================================
|
||||
/** 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
|
||||
{
|
||||
|
||||
typedef void (*AppFocusChangeCallback)();
|
||||
using AppFocusChangeCallback = void (*)();
|
||||
AppFocusChangeCallback appFocusChangeCallback = nullptr;
|
||||
|
||||
typedef bool (*CheckEventBlockedByModalComps) (NSEvent*);
|
||||
using CheckEventBlockedByModalComps = bool (*)(NSEvent*);
|
||||
CheckEventBlockedByModalComps isEventBlockedByModalComps = nullptr;
|
||||
|
||||
typedef void (*MenuTrackingChangedCallback)(bool);
|
||||
using MenuTrackingChangedCallback = void (*)(bool);
|
||||
MenuTrackingChangedCallback menuTrackingChangedCallback = nullptr;
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ namespace juce
|
|||
|
||||
extern HWND juce_messageWindowHandle;
|
||||
|
||||
typedef bool (*CheckEventBlockedByModalComps) (const MSG&);
|
||||
using CheckEventBlockedByModalComps = bool (*)(const MSG&);
|
||||
CheckEventBlockedByModalComps isEventBlockedByModalComps = nullptr;
|
||||
|
||||
typedef void (*SettingChangeCallbackFunc) (void);
|
||||
using SettingChangeCallbackFunc = void (*)(void);
|
||||
SettingChangeCallbackFunc settingChangeCallback = nullptr;
|
||||
|
||||
#if JUCE_MODULE_AVAILABLE_juce_audio_plugin_client && JucePlugin_Build_Unity
|
||||
|
|
@ -72,7 +72,7 @@ namespace WindowsMessageHelpers
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void handleBroadcastMessage (const COPYDATASTRUCT* const data)
|
||||
void handleBroadcastMessage (const COPYDATASTRUCT* data)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
|
@ -108,11 +108,10 @@ namespace WindowsMessageHelpers
|
|||
handleBroadcastMessage (reinterpret_cast<const COPYDATASTRUCT*> (lParam));
|
||||
return 0;
|
||||
}
|
||||
else if (message == WM_SETTINGCHANGE)
|
||||
{
|
||||
|
||||
if (message == WM_SETTINGCHANGE)
|
||||
if (settingChangeCallback != nullptr)
|
||||
settingChangeCallback();
|
||||
}
|
||||
}
|
||||
|
||||
return DefWindowProc (h, message, wParam, lParam);
|
||||
|
|
@ -124,7 +123,7 @@ LRESULT juce_offerEventToActiveXControl (::MSG&);
|
|||
#endif
|
||||
|
||||
//==============================================================================
|
||||
bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPendingMessages)
|
||||
bool MessageManager::dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages)
|
||||
{
|
||||
using namespace WindowsMessageHelpers;
|
||||
MSG m;
|
||||
|
|
@ -134,10 +133,10 @@ bool MessageManager::dispatchNextMessageOnSystemQueue (const bool returnIfNoPend
|
|||
|
||||
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)
|
||||
return true;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (m.message == customMessageID && m.hwnd == juce_messageWindowHandle)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace FontValues
|
|||
String fallbackFontStyle;
|
||||
}
|
||||
|
||||
typedef Typeface::Ptr (*GetTypefaceForFont) (const Font&);
|
||||
using GetTypefaceForFont = Typeface::Ptr (*)(const Font&);
|
||||
GetTypefaceForFont juce_getTypefaceForFont = nullptr;
|
||||
|
||||
float Font::getDefaultMinimumHorizontalScaleFactor() noexcept { return FontValues::minimumHorizontalScale; }
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ static Typeface::Ptr getTypefaceForFontFromLookAndFeel (const Font& font)
|
|||
return LookAndFeel::getDefaultLookAndFeel().getTypefaceForFont (font);
|
||||
}
|
||||
|
||||
typedef Typeface::Ptr (*GetTypefaceForFont) (const Font&);
|
||||
using GetTypefaceForFont = Typeface::Ptr (*)(const Font&);
|
||||
extern GetTypefaceForFont juce_getTypefaceForFont;
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -765,7 +765,7 @@ const PopupMenu* MenuBarModel::getMacExtraAppleItemsMenu()
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
typedef void (*MenuTrackingChangedCallback) (bool);
|
||||
using MenuTrackingChangedCallback = void (*)(bool);
|
||||
extern MenuTrackingChangedCallback menuTrackingChangedCallback;
|
||||
|
||||
static void mainMenuTrackingChanged (bool isTracking)
|
||||
|
|
|
|||
|
|
@ -204,17 +204,13 @@ namespace LiveConstantEditor
|
|||
LiveValue<Type>& getValue (const char* file, int line, const Type& initialValue)
|
||||
{
|
||||
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)
|
||||
return *static_cast<ValueType*> (v);
|
||||
}
|
||||
|
||||
ValueType* v = new ValueType (file, line, initialValue);
|
||||
auto v = new ValueType (file, line, initialValue);
|
||||
addValue (v);
|
||||
return *v;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ namespace juce
|
|||
//==============================================================================
|
||||
|
||||
/** The type used for OSC type tags. */
|
||||
typedef char OSCType;
|
||||
using OSCType = char;
|
||||
|
||||
|
||||
/** The type used for OSC type tag strings. */
|
||||
typedef Array<OSCType> OSCTypeList;
|
||||
using OSCTypeList = Array<OSCType>;
|
||||
|
||||
//==============================================================================
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue