diff --git a/doc/changelog.dox b/doc/changelog.dox index 979cba044..fdd36674a 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -1449,11 +1449,14 @@ See also: particular, if `BUILD_DEPRECATED` is set but `MAGNUM_BUILD_DEPRECATED` not, the unprefixed options are also recognized. See also [mosra/corrade#139](https://github.com/mosra/corrade/issues/139). -- @cpp GL::Context::supportedExtensions() @ce is deprecated as it doesn't - provide anything that @ref GL::Context::extensionStrings(), - @ref GL::Extension::extensions() and @ref GL::Context::isExtensionSupported() - wouldn't provide already and only causes extra overhead during context - creation +- @cpp GL::Context::supportedExtensions() @ce / + @cpp Audio::Context::supportedExtensions() @ce is deprecated as it doesn't + provide anything that @ref GL::Context::extensionStrings() / + @ref Audio::Context::extensionStrings(), @ref GL::Extension::extensions() / + @ref Audio::Extension::extensions() and + @ref GL::Context::isExtensionSupported() / + @ref Audio::Context::isExtensionSupported() wouldn't provide already and + only causes extra overhead during context creation - @ref GL::DebugOutput::setCallback() taking a @ref std::string in the callback function pointer is deprecated in favor of a version taking a @relativeref{Corrade,Containers::StringView}. See also diff --git a/src/Magnum/Audio/Context.cpp b/src/Magnum/Audio/Context.cpp index c9c174fbe..b41d01099 100644 --- a/src/Magnum/Audio/Context.cpp +++ b/src/Magnum/Audio/Context.cpp @@ -290,7 +290,9 @@ bool Context::tryCreate(const Configuration& configuration) { const Containers::Array extensions = extensionStrings(); for(const Containers::StringView extension: extensions) { if(const Extension* found = findExtension(extension)) { + #ifdef MAGNUM_BUILD_DEPRECATED arrayAppend(_supportedExtensions, *found); + #endif _extensionStatus.set(found->index(), true); } } @@ -317,7 +319,11 @@ bool Context::tryCreate(const Configuration& configuration) { return true; } -Context::Context(Context&& other) noexcept: _device{other._device}, _context{other._context}, _extensionStatus{Utility::move(other._extensionStatus)}, _supportedExtensions{Utility::move(other._supportedExtensions)} { +Context::Context(Context&& other) noexcept: _device{other._device}, _context{other._context}, _extensionStatus{Utility::move(other._extensionStatus)} + #ifdef MAGNUM_BUILD_DEPRECATED + , _supportedExtensions{Utility::move(other._supportedExtensions)} + #endif +{ other._device = nullptr; other._context = nullptr; if(currentContext == &other) diff --git a/src/Magnum/Audio/Context.h b/src/Magnum/Audio/Context.h index 21b62d462..967f065ba 100644 --- a/src/Magnum/Audio/Context.h +++ b/src/Magnum/Audio/Context.h @@ -418,16 +418,21 @@ class MAGNUM_AUDIO_EXPORT Context { */ Containers::Array extensionStrings() const; + #ifdef MAGNUM_BUILD_DEPRECATED /** * @brief Supported extensions * * The list contains only extensions from OpenAL versions newer than * the current. - * @see @ref isExtensionSupported(), @ref Extension::extensions() + * @m_deprecated_since_latest Deprecated as it doesn't provide anything + * that @ref extensionStrings(), @ref Extension::extensions() and + * @ref isExtensionSupported() wouldn't provide already and only + * causes extra overhead during context creation. */ - Containers::ArrayView supportedExtensions() const { + CORRADE_DEPRECATED("use extensionStrings(), Extension::extensions() and isExtensionSupported() instead") Containers::ArrayView supportedExtensions() const { return _supportedExtensions; } + #endif /** * @brief Whether given extension is supported @@ -488,7 +493,9 @@ class MAGNUM_AUDIO_EXPORT Context { Math::BitVector _extensionStatus; Math::BitVector _extensionDisabledStatus; + #ifdef MAGNUM_BUILD_DEPRECATED Containers::Array _supportedExtensions; + #endif Containers::Array _disabledExtensions; };