From 11ed4882e0ea639bae017595dd8bda3111ccea4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 16 Nov 2014 18:13:01 +0100 Subject: [PATCH] Removed some workarounds for references in documentation. Fixed in Doxygen master. Yay! --- doc/transformations.dox | 6 ++---- src/Magnum/Context.h | 12 ++++------- src/Magnum/Math/Complex.h | 9 +++----- src/Magnum/Math/DualComplex.h | 4 +--- src/Magnum/Math/DualQuaternion.h | 6 ++---- src/Magnum/Math/Matrix3.h | 27 ++++++++---------------- src/Magnum/Math/Matrix4.h | 36 +++++++++++--------------------- src/Magnum/Math/Quaternion.h | 8 +++---- src/Magnum/Math/Vector.h | 7 ++----- src/Magnum/Resource.h | 3 +-- src/Magnum/Shapes/Collision.h | 3 +-- 11 files changed, 40 insertions(+), 81 deletions(-) diff --git a/doc/transformations.dox b/doc/transformations.dox index b6d491223..02ebbd29b 100644 --- a/doc/transformations.dox +++ b/doc/transformations.dox @@ -259,10 +259,8 @@ Complex numbers and quaternions are far better in this regard and they allow you to extract rotation angle using @ref Complex::angle() or @ref Quaternion::angle() or rotation axis in 3D using @ref Quaternion::axis(). Their dual versions allow to extract both rotation and translation part using -@link DualComplex::rotation() const @endlink, @link DualQuaternion::rotation() const @endlink, -@link DualComplex::translation() const @endlink and -@link DualQuaternion::translation() const @endlink. -@todoc Remove workaround when Doxygen can handle const +@ref DualComplex::rotation() const, @ref DualQuaternion::rotation() const, +@ref DualComplex::translation() const and @ref DualQuaternion::translation() const. @code DualComplex a; Rad rotationAngle = a.rotation().angle(); diff --git a/src/Magnum/Context.h b/src/Magnum/Context.h index a6a3ab08a..031c1a411 100644 --- a/src/Magnum/Context.h +++ b/src/Magnum/Context.h @@ -357,8 +357,7 @@ class MAGNUM_EXPORT Context { * If no version from the list is supported, returns lowest available * OpenGL version (@ref Version::GL210 for desktop OpenGL, * @ref Version::GLES200 for OpenGL ES). - * @see @link isExtensionSupported(Version) const @endlink - * @todoc Remove workaround when Doxygen can handle const + * @see @ref isExtensionSupported(Version) const */ Version supportedVersion(std::initializer_list versions) const; @@ -375,10 +374,9 @@ class MAGNUM_EXPORT Context { * } * @endcode * - * @see @link isExtensionSupported(const Extension&) const @endlink, + * @see @ref isExtensionSupported(const Extension&) const, * @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED(), * @ref isExtensionDisabled() - * @todoc Remove workaround when Doxygen can handle const */ template bool isExtensionSupported() const { return isExtensionSupported(version()); @@ -407,11 +405,10 @@ class MAGNUM_EXPORT Context { * @brief Whether given extension is supported * * Can be used e.g. for listing extensions available on current - * hardware, but for general usage prefer @link isExtensionSupported() const @endlink, + * hardware, but for general usage prefer @ref isExtensionSupported() const, * as it does most operations in compile time. * @see @ref supportedExtensions(), @ref Extension::extensions(), * @ref MAGNUM_ASSERT_EXTENSION_SUPPORTED() - * @todoc Remove workaround when Doxygen can handle const */ bool isExtensionSupported(const Extension& extension) const { return isVersionSupported(_extensionRequiredVersion[extension._index]) && extensionStatus[extension._index]; @@ -443,9 +440,8 @@ class MAGNUM_EXPORT Context { * @brief Whether given extension is disabled * * Can be used e.g. for listing extensions available on current - * hardware, but for general usage prefer @link isExtensionDisabled() const @endlink, + * hardware, but for general usage prefer @ref isExtensionDisabled() const, * as it does most operations in compile time. - * @todoc Remove workaround when Doxygen can handle const */ bool isExtensionDisabled(const Extension& extension) const { return isVersionSupported(extension._requiredVersion) && !isVersionSupported(_extensionRequiredVersion[extension._index]); diff --git a/src/Magnum/Math/Complex.h b/src/Magnum/Math/Complex.h index 076774996..1250ac619 100644 --- a/src/Magnum/Math/Complex.h +++ b/src/Magnum/Math/Complex.h @@ -63,8 +63,7 @@ template class Complex { * @f[ * c_0 \cdot c_1 = a_0 a_1 + b_0 b_1 * @f] - * @see @link Complex::dot() const @endlink - * @todoc Remove workaround when Doxygen can handle const + * @see @ref Complex::dot() const */ static T dot(const Complex& a, const Complex& b) { return a._real*b._real + a._imaginary*b._imaginary; @@ -136,8 +135,7 @@ template class Complex { * To be used in transformations later. @f[ * c = v_x + iv_y * @f] - * @see @ref Complex::operator Vector2() "operator Vector2()", @ref transformVector() - * @todoc Remove workaround when Doxygen can handle unscoped conversion operators + * @see @ref operator Vector2(), @ref transformVector() */ constexpr explicit Complex(const Vector2& vector): _real(vector.x()), _imaginary(vector.y()) {} @@ -407,9 +405,8 @@ template class Complex { * @f[ * v' = c v = c (v_x + iv_y) * @f] - * @see @ref Complex(const Vector2&), @ref Complex::operator Vector2() "operator Vector2()", + * @see @ref Complex(const Vector2&), @ref operator Vector2(), * @ref Matrix3::transformVector() - * @todoc Remove workaround when Doxygen can handle unscoped conversion operators */ Vector2 transformVector(const Vector2& vector) const { return Vector2((*this)*Complex(vector)); diff --git a/src/Magnum/Math/DualComplex.h b/src/Magnum/Math/DualComplex.h index a8b8a977c..a5fe64608 100644 --- a/src/Magnum/Math/DualComplex.h +++ b/src/Magnum/Math/DualComplex.h @@ -71,11 +71,9 @@ template class DualComplex: public Dual> { * @f[ * \hat c = (0 + i1) + \epsilon (v_x + iv_y) * @f] - * @see @link translation() const @endlink, - * @ref Matrix3::translation(const Vector2&), + * @see @ref translation() const, @ref Matrix3::translation(const Vector2&), * @ref DualQuaternion::translation(), @ref Vector2::xAxis(), * @ref Vector2::yAxis() - * @todoc Remove workaround when Doxygen can handle const */ static DualComplex translation(const Vector2& vector) { return {{}, {vector.x(), vector.y()}}; diff --git a/src/Magnum/Math/DualQuaternion.h b/src/Magnum/Math/DualQuaternion.h index 17618da4d..a9532a9e4 100644 --- a/src/Magnum/Math/DualQuaternion.h +++ b/src/Magnum/Math/DualQuaternion.h @@ -56,11 +56,10 @@ template class DualQuaternion: public Dual> { * Expects that the rotation axis is normalized. @f[ * \hat q = [\boldsymbol a \cdot sin \frac \theta 2, cos \frac \theta 2] + \epsilon [\boldsymbol 0, 0] * @f] - * @see @link rotation() const @endlink, @ref Quaternion::rotation(), + * @see @ref rotation() const, @ref Quaternion::rotation(), * @ref Matrix4::rotation(), @ref DualComplex::rotation(), * @ref Vector3::xAxis(), @ref Vector3::yAxis(), * @ref Vector3::zAxis(), @ref Vector::isNormalized() - * @todoc Remove workaround when Doxygen can handle const */ static DualQuaternion rotation(Rad angle, const Vector3& normalizedAxis) { return {Quaternion::rotation(angle, normalizedAxis), {{}, T(0)}}; @@ -75,11 +74,10 @@ template class DualQuaternion: public Dual> { * @f[ * \hat q = [\boldsymbol 0, 1] + \epsilon [\frac{\boldsymbol v}{2}, 0] * @f] - * @see @link translation() const @endlink, + * @see @ref translation() const, * @ref Matrix4::translation(const Vector3&), * @ref DualComplex::translation(), @ref Vector3::xAxis(), * @ref Vector3::yAxis(), @ref Vector3::zAxis() - * @todoc Remove workaround when Doxygen can handle const */ static DualQuaternion translation(const Vector3& vector) { return {{}, {vector/T(2), T(0)}}; diff --git a/src/Magnum/Math/Matrix3.h b/src/Magnum/Math/Matrix3.h index d620a4baf..00010a4b2 100644 --- a/src/Magnum/Math/Matrix3.h +++ b/src/Magnum/Math/Matrix3.h @@ -49,10 +49,9 @@ template class Matrix3: public Matrix3x3 { * @brief 2D translation matrix * @param vector Translation vector * - * @see @link translation() const @endlink, @ref DualComplex::translation(), + * @see @ref translation() const, @ref DualComplex::translation(), * @ref Matrix4::translation(const Vector3&), * @ref Vector2::xAxis(), @ref Vector2::yAxis() - * @todoc Remove workaround when Doxygen can handle const */ constexpr static Matrix3 translation(const Vector2& vector) { return {{ T(1), T(0), T(0)}, @@ -78,10 +77,9 @@ template class Matrix3: public Matrix3x3 { * @brief 2D rotation matrix * @param angle Rotation angle (counterclockwise) * - * @see @link rotation() const @endlink, @ref Complex::rotation(), + * @see @ref rotation() const, @ref Complex::rotation(), * @ref DualComplex::rotation(), * @ref Matrix4::rotation(Rad, const Vector3&) - * @todoc Remove workaround when Doxygen can handle const */ static Matrix3 rotation(Rad angle); @@ -116,8 +114,7 @@ template class Matrix3: public Matrix3x3 { * @param translation Translation part (first two elements of * third column) * - * @see @ref rotationScaling(), @link translation() const @endlink - * @todoc Remove workaround when Doxygen can handle const + * @see @ref rotationScaling(), @ref translation() const */ constexpr static Matrix3 from(const Matrix2x2& rotationScaling, const Vector2& translation) { return {{rotationScaling[0], T(0)}, @@ -165,10 +162,9 @@ template class Matrix3: public Matrix3x3 { * * Upper-left 2x2 part of the matrix. * @see @ref from(const Matrix2x2&, const Vector2&), - * @link rotation() const @endlink, @ref rotationNormalized(), + * @ref rotation() const, @ref rotationNormalized(), * @ref uniformScaling(), @ref rotation(Rad), * @ref Matrix4::rotationScaling() - * @todoc Remove workaround when Doxygen can handle const */ constexpr Matrix2x2 rotationScaling() const { return {(*this)[0].xy(), @@ -180,10 +176,9 @@ template class Matrix3: public Matrix3x3 { * * Similar to @ref rotationScaling(), but additionally checks that the * base vectors are normalized. - * @see @link rotation() const @endlink, @ref uniformScaling(), + * @see @ref rotation() const, @ref uniformScaling(), * @ref Matrix4::rotationNormalized() * @todo assert also orthogonality or this is good enough? - * @todoc Remove workaround when Doxygen can handle const */ Matrix2x2 rotationNormalized() const { CORRADE_ASSERT((*this)[0].xy().isNormalized() && (*this)[1].xy().isNormalized(), @@ -199,8 +194,7 @@ template class Matrix3: public Matrix3x3 { * scaling. * @see @ref rotationNormalized(), @ref rotationScaling(), * @ref uniformScaling(), @ref rotation(Rad), - * @link Matrix4::rotation() const @endlink - * @todoc Remove workaround when Doxygen can handle const + * @ref Matrix4::rotation() const */ Matrix2x2 rotation() const { CORRADE_ASSERT(TypeTraits::equals((*this)[0].xy().dot(), (*this)[1].xy().dot()), @@ -216,10 +210,9 @@ template class Matrix3: public Matrix3x3 { * Expects that the scaling is the same in all axes. Faster alternative * to @ref uniformScaling(), because it doesn't compute the square * root. - * @see @ref rotationScaling(), @link rotation() const @endlink, + * @see @ref rotationScaling(), @ref rotation() const, * @ref rotationNormalized(), @ref scaling(const Vector2&), * @ref Matrix4::uniformScaling() - * @todoc Remove workaround when Doxygen can handle const */ T uniformScalingSquared() const { const T scalingSquared = (*this)[0].xy().dot(); @@ -234,10 +227,9 @@ template class Matrix3: public Matrix3x3 { * Length of vectors in upper-left 2x2 part of the matrix. Expects that * the scaling is the same in all axes. Use faster alternative * @ref uniformScalingSquared() where possible. - * @see @ref rotationScaling(), @link rotation() const @endlink, + * @see @ref rotationScaling(), @ref rotation() const, * @ref rotationNormalized(), @ref scaling(const Vector2&), * @ref Matrix4::uniformScaling() - * @todoc Remove workaround when Doxygen can handle const */ T uniformScaling() const { return std::sqrt(uniformScalingSquared()); } @@ -280,9 +272,8 @@ template class Matrix3: public Matrix3x3 { * @f$ A^{i, j} @f$ is matrix without i-th row and j-th column, see * @ref ij() * @see @ref isRigidTransformation(), @ref invertedOrthogonal(), - * @ref rotationScaling(), @link translation() const @endlink, + * @ref rotationScaling(), @ref translation() const, * @ref Matrix4::invertedRigid() - * @todoc Remove workaround when Doxygen can handle const */ Matrix3 invertedRigid() const; diff --git a/src/Magnum/Math/Matrix4.h b/src/Magnum/Math/Matrix4.h index fc011c4be..d5a2ff3f7 100644 --- a/src/Magnum/Math/Matrix4.h +++ b/src/Magnum/Math/Matrix4.h @@ -90,11 +90,10 @@ template class Matrix4: public Matrix4x4 { * Expects that the rotation axis is normalized. If possible, use * faster alternatives like @ref rotationX(), @ref rotationY() and * @ref rotationZ(). - * @see @link rotation() const @endlink, @ref Quaternion::rotation(), + * @see @ref rotation() const, @ref Quaternion::rotation(), * @ref DualQuaternion::rotation(), @ref Matrix3::rotation(Rad), * @ref Vector3::xAxis(), @ref Vector3::yAxis(), * @ref Vector3::zAxis(), @ref Vector::isNormalized() - * @todoc Remove workaround when Doxygen can handle const */ static Matrix4 rotation(Rad angle, const Vector3& normalizedAxis); @@ -104,9 +103,8 @@ template class Matrix4: public Matrix4x4 { * * Faster than calling `Matrix4::rotation(angle, Vector3::xAxis())`. * @see @ref rotation(Rad, const Vector3&), @ref rotationY(), - * @ref rotationZ(), @link rotation() const @endlink, + * @ref rotationZ(), @ref rotation() const, * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) - * @todoc Remove workaround when Doxygen can handle const */ static Matrix4 rotationX(Rad angle); @@ -116,9 +114,8 @@ template class Matrix4: public Matrix4x4 { * * Faster than calling `Matrix4::rotation(angle, Vector3::yAxis())`. * @see @ref rotation(Rad, const Vector3&), @ref rotationX(), - * @ref rotationZ(), @link rotation() const @endlink, + * @ref rotationZ(), @ref rotation() const, * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) - * @todoc Remove workaround when Doxygen can handle const */ static Matrix4 rotationY(Rad angle); @@ -128,9 +125,8 @@ template class Matrix4: public Matrix4x4 { * * Faster than calling `Matrix4::rotation(angle, Vector3::zAxis())`. * @see @ref rotation(Rad, const Vector3&), @ref rotationX(), - * @ref rotationY(), @link rotation() const @endlink, + * @ref rotationY(), @ref rotation() const, * @ref Quaternion::rotation(), @ref Matrix3::rotation(Rad) - * @todoc Remove workaround when Doxygen can handle const */ static Matrix4 rotationZ(Rad angle); @@ -184,8 +180,7 @@ template class Matrix4: public Matrix4x4 { * @param translation Translation part (first three elements of * fourth column) * - * @see @ref rotationScaling(), @link translation() const @endlink - * @todoc Remove workaround when Doxygen can handle const + * @see @ref rotationScaling(), @ref translation() const */ constexpr static Matrix4 from(const Matrix3x3& rotationScaling, const Vector3& translation) { return {{rotationScaling[0], T(0)}, @@ -234,11 +229,9 @@ template class Matrix4: public Matrix4x4 { * * Upper-left 3x3 part of the matrix. * @see @ref from(const Matrix3x3&, const Vector3&), - * @link rotation() const @endlink, @ref rotationNormalized(), + * @ref rotation() const, @ref rotationNormalized(), * @ref uniformScaling(), @ref rotation(Rad, const Vector3&), - * @link Matrix3::rotationScaling() const @endlink - * @todoc Remove workaround when Doxygen can handle const - * @todoc Remove workaround when Doxygen can handle const + * @ref Matrix3::rotationScaling() const */ constexpr Matrix3x3 rotationScaling() const { return {(*this)[0].xyz(), @@ -251,10 +244,9 @@ template class Matrix4: public Matrix4x4 { * * Similar to @ref rotationScaling(), but additionally checks that the * base vectors are normalized. - * @see @link rotation() const @endlink, @ref uniformScaling(), + * @see @ref rotation() const, @ref uniformScaling(), * @ref Matrix3::rotationNormalized() * @todo assert also orthogonality or this is good enough? - * @todoc Remove workaround when Doxygen can handle const */ Matrix3x3 rotationNormalized() const { CORRADE_ASSERT((*this)[0].xyz().isNormalized() && (*this)[1].xyz().isNormalized() && (*this)[2].xyz().isNormalized(), @@ -271,8 +263,7 @@ template class Matrix4: public Matrix4x4 { * scaling. * @see @ref rotationNormalized(), @ref rotationScaling(), * @ref uniformScaling(), @ref rotation(Rad, const Vector3&), - * @link Matrix3::rotation() const @endlink - * @todoc Remove workaround when Doxygen can handle const + * @ref Matrix3::rotation() const */ Matrix3x3 rotation() const; @@ -283,10 +274,9 @@ template class Matrix4: public Matrix4x4 { * Expects that the scaling is the same in all axes. Faster alternative * to @ref uniformScaling(), because it doesn't compute the square * root. - * @see @ref rotationScaling(), @link rotation() const @endlink, + * @see @ref rotationScaling(), @ref rotation() const, * @ref rotationNormalized(), @ref scaling(const Vector3&), * @ref Matrix3::uniformScaling() - * @todoc Remove workaround when Doxygen can handle const */ T uniformScalingSquared() const; @@ -296,10 +286,9 @@ template class Matrix4: public Matrix4x4 { * Length of vectors in upper-left 3x3 part of the matrix. Expects that * the scaling is the same in all axes. Use faster alternative * @ref uniformScalingSquared() where possible. - * @see @ref rotationScaling(), @link rotation() const @endlink, + * @see @ref rotationScaling(), @ref rotation() const, * @ref rotationNormalized(), @ref scaling(const Vector3&), * @ref Matrix3::uniformScaling() - * @todoc Remove workaround when Doxygen can handle const */ T uniformScaling() const { return std::sqrt(uniformScalingSquared()); } @@ -353,9 +342,8 @@ template class Matrix4: public Matrix4x4 { * @f$ A^{i, j} @f$ is matrix without i-th row and j-th column, see * @ref ij() * @see @ref isRigidTransformation(), @ref invertedOrthogonal(), - * @ref rotationScaling(), @link translation() const @endlink, + * @ref rotationScaling(), @ref translation() const, * @ref Matrix3::invertedRigid() - * @todoc Remove workaround when Doxygen can handle const */ Matrix4 invertedRigid() const; diff --git a/src/Magnum/Math/Quaternion.h b/src/Magnum/Math/Quaternion.h index bfec3aef7..b5cc94880 100644 --- a/src/Magnum/Math/Quaternion.h +++ b/src/Magnum/Math/Quaternion.h @@ -57,8 +57,7 @@ template class Quaternion { * @f[ * p \cdot q = \boldsymbol p_V \cdot \boldsymbol q_V + p_S q_S * @f] - * @see @link dot() const @endlink - * @todoc Remove workaround when Doxygen can handle const + * @see @ref dot() const */ static T dot(const Quaternion& a, const Quaternion& b) { /** @todo Use four-component SIMD implementation when available */ @@ -337,12 +336,11 @@ template class Quaternion { /** * @brief Quaternion length * - * See also @link dot() const @endlink which is faster for comparing - * length with other values. @f[ + * See also @ref dot() const which is faster for comparing length with + * other values. @f[ * |q| = \sqrt{q \cdot q} * @f] * @see @ref isNormalized() - * @todoc Remove workaround when Doxygen can handle const */ T length() const { return std::sqrt(dot()); } diff --git a/src/Magnum/Math/Vector.h b/src/Magnum/Math/Vector.h index eb2a2c530..f23da2e00 100644 --- a/src/Magnum/Math/Vector.h +++ b/src/Magnum/Math/Vector.h @@ -87,9 +87,7 @@ template class Vector { * antiparallel. @f[ * \boldsymbol a \cdot \boldsymbol b = \sum_{i=0}^{n-1} \boldsymbol a_i \boldsymbol b_i * @f] - * @see @link dot() const @endlink, @ref operator-(), - * @ref Vector2::perpendicular() - * @todoc Remove workaround when Doxygen can handle const + * @see @ref dot() const, @ref operator-(), @ref Vector2::perpendicular() */ static T dot(const Vector& a, const Vector& b) { return (a*b).sum(); @@ -469,8 +467,7 @@ template class Vector { * \boldsymbol a_1 = \frac{\boldsymbol a \cdot \boldsymbol b}{\boldsymbol b \cdot \boldsymbol b} \boldsymbol b = * (\boldsymbol a \cdot \boldsymbol b) \boldsymbol b * @f] - * @see @link dot() const @endlink - * @todoc Remove workaround when Doxygen can handle const + * @see @ref dot() const */ Vector projectedOntoNormalized(const Vector& line) const; diff --git a/src/Magnum/Resource.h b/src/Magnum/Resource.h index c6755b325..87f81490e 100644 --- a/src/Magnum/Resource.h +++ b/src/Magnum/Resource.h @@ -155,8 +155,7 @@ class Resource { /** * @brief Resource state * - * @see @ref Resource::operator bool() "operator bool()", @ref ResourceManager::state() - * @todoc Remove workaround when Doxygen can handle unscoped conversion operators + * @see @ref operator bool(), @ref ResourceManager::state() */ ResourceState state() { acquire(); diff --git a/src/Magnum/Shapes/Collision.h b/src/Magnum/Shapes/Collision.h index d387dcd33..85c34fd61 100644 --- a/src/Magnum/Shapes/Collision.h +++ b/src/Magnum/Shapes/Collision.h @@ -97,8 +97,7 @@ template class Collision { /** * @brief Separation distance * - * @see @ref separationNormal(), @ref Collision::operator bool() "operator bool()" - * @todoc Remove workaround when Doxygen can handle unscoped conversion operators + * @see @ref separationNormal(), @ref operator bool() */ Float separationDistance() const { return _separationDistance;