From 93686746ab8f3033bf0de00598dc8b114d40497e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 3 Apr 2019 16:20:48 +0200 Subject: [PATCH] Pernament is not a word. /me hides in embarrassment --- doc/changelog.dox | 4 +++- src/Magnum/FileCallback.cpp | 2 +- src/Magnum/FileCallback.h | 13 ++++++++++++- src/Magnum/SceneGraph/Animable.h | 2 +- src/Magnum/Text/Test/AbstractFontTest.cpp | 2 +- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index 4a8288ce1..7476053a5 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -315,7 +315,9 @@ See also: to ensure forward compatibility - @cpp Trade::ImporterFileCallbackPolicy @ce is deprecated as it was moved to @ref InputFileCallbackPolicy in the root namespace to be shared with - APIs outside of the @ref Trade namespace + APIs outside of the @ref Trade namespace. Moreover, + @cpp InputFileCallbackPolicy::LoadPernament @ce is deprecated due to a + typo, use @ref InputFileCallbackPolicy::LoadPermanent instead. - @cpp DebugTools::ForceRendererOptions::scale() @ce is deprecated in favor of @ref DebugTools::ForceRendererOptions::size(), as that's more consistent with the documentation and the corresponding setter. diff --git a/src/Magnum/FileCallback.cpp b/src/Magnum/FileCallback.cpp index 6c0fd6c5f..d87ce4769 100644 --- a/src/Magnum/FileCallback.cpp +++ b/src/Magnum/FileCallback.cpp @@ -34,7 +34,7 @@ Debug& operator<<(Debug& debug, const InputFileCallbackPolicy value) { /* LCOV_EXCL_START */ #define _c(v) case InputFileCallbackPolicy::v: return debug << "InputFileCallbackPolicy::" #v; _c(LoadTemporary) - _c(LoadPernament) + _c(LoadPermanent) _c(Close) #undef _c /* LCOV_EXCL_STOP */ diff --git a/src/Magnum/FileCallback.h b/src/Magnum/FileCallback.h index 6dcf3869d..4087012e3 100644 --- a/src/Magnum/FileCallback.h +++ b/src/Magnum/FileCallback.h @@ -32,6 +32,10 @@ #include "Magnum/Magnum.h" #include "Magnum/visibility.h" +#ifdef MAGNUM_BUILD_DEPRECATED +#include +#endif + namespace Magnum { /** @@ -67,7 +71,14 @@ enum class InputFileCallbackPolicy: UnsignedByte { * of it. Note, however, that this might not be the case for all importers * --- see documentation of a particular plugin for concrete info. */ - LoadPernament, + LoadPermanent, + + #ifdef MAGNUM_BUILD_DEPRECATED + /** + * @deprecated Use @ref InputFileCallbackPolicy::LoadPermanent instead. + */ + LoadPernament CORRADE_DEPRECATED_ENUM("use LoadPermanent instead") = LoadPermanent, + #endif /** * A file that has been previously loaded by this callback can be closed diff --git a/src/Magnum/SceneGraph/Animable.h b/src/Magnum/SceneGraph/Animable.h index f1d99c5c5..d8e918e71 100644 --- a/src/Magnum/SceneGraph/Animable.h +++ b/src/Magnum/SceneGraph/Animable.h @@ -103,7 +103,7 @@ use @ref Timeline for that, see its documentation for more information. @ref AnimableGroup is optimized for case when no animation is running --- it just puts itself to rest and waits until some animation changes its state to @ref AnimationState::Running again. If you put animations which are not -pernamently running into separate group, they will not be traversed every time +permanently running into separate group, they will not be traversed every time the @ref AnimableGroup::step() gets called, saving precious frame time. @section SceneGraph-Animable-explicit-specializations Explicit template specializations diff --git a/src/Magnum/Text/Test/AbstractFontTest.cpp b/src/Magnum/Text/Test/AbstractFontTest.cpp index e9a4ab2c2..6e5cfb1da 100644 --- a/src/Magnum/Text/Test/AbstractFontTest.cpp +++ b/src/Magnum/Text/Test/AbstractFontTest.cpp @@ -349,7 +349,7 @@ void AbstractFontTest::openMultiDataDeprecated() { Metrics doOpenData(const Containers::ArrayView data, Float size) override { if(!fileCallback()) return {}; - Containers::Optional> dataExt = fileCallback()("data.ext", InputFileCallbackPolicy::LoadPernament, fileCallbackUserData()); + Containers::Optional> dataExt = fileCallback()("data.ext", InputFileCallbackPolicy::LoadPermanent, fileCallbackUserData()); _opened = (data.size() == 1 && data[0] == '\xa5' && dataExt && dataExt->size() == 2 && (*dataExt)[1] == '\xee'); return {size, 1.0f, 2.0f, 3.0f};