1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Update code to use C++14 [[deprecated]] attribute

This commit removes the various compiler-specific JUCE_DEPRECATED macros and replaces them with C++14's deprecated attribute. It also removes the JUCE_CATCH_DEPRECATED_CODE_MISUSE flag as we can rely on the override specifier catching usage of these old virtual methods, and tidies up the DOXYGEN preprocessor checks as they were inconsistent across the codebase.
This commit is contained in:
ed 2021-08-25 10:08:55 +01:00
parent a435026b24
commit b9542ccc4c
104 changed files with 579 additions and 587 deletions

View file

@ -471,18 +471,20 @@ public:
int getXRunCount() const noexcept;
//==============================================================================
/** Deprecated. */
#ifndef DOXYGEN
[[deprecated ("Use setMidiInputDeviceEnabled instead.")]]
void setMidiInputEnabled (const String&, bool);
/** Deprecated. */
[[deprecated ("Use isMidiInputDeviceEnabled instead.")]]
bool isMidiInputEnabled (const String&) const;
/** Deprecated. */
[[deprecated ("Use addMidiInputDeviceCallback instead.")]]
void addMidiInputCallback (const String&, MidiInputCallback*);
/** Deprecated. */
[[deprecated ("Use removeMidiInputDeviceCallback instead.")]]
void removeMidiInputCallback (const String&, MidiInputCallback*);
/** Deprecated. */
[[deprecated ("Use setDefaultMidiOutputDevice instead.")]]
void setDefaultMidiOutput (const String&);
/** Deprecated. */
[[deprecated ("Use getDefaultMidiOutputIdentifier instead.")]]
const String& getDefaultMidiOutputName() const noexcept { return defaultMidiOutputDeviceInfo.name; }
#endif
private:
//==============================================================================

View file

@ -167,8 +167,10 @@ public:
/** Creates a Bela device type if it's available on this platform, or returns null. */
static AudioIODeviceType* createAudioIODeviceType_Bela();
/** This method has been deprecated. You should call the method which takes a WASAPIDeviceMode instead. */
JUCE_DEPRECATED (static AudioIODeviceType* createAudioIODeviceType_WASAPI (bool exclusiveMode));
#ifndef DOXYGEN
[[deprecated ("You should call the method which takes a WASAPIDeviceMode instead.")]]
static AudioIODeviceType* createAudioIODeviceType_WASAPI (bool exclusiveMode);
#endif
protected:
explicit AudioIODeviceType (const String& typeName);