From 5a42ee4e91fcff0b25c92c216ac6b069dac78123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 22 May 2012 16:05:13 +0200 Subject: [PATCH] Doc: using @overload for const overloads of member functions. --- src/Math/Matrix.h | 22 +++------------------- src/Math/Vector.h | 23 +++-------------------- src/Trade/MeshData.h | 8 ++++---- 3 files changed, 10 insertions(+), 43 deletions(-) diff --git a/src/Math/Matrix.h b/src/Math/Matrix.h index d77a35e9c..3ab2c2b97 100644 --- a/src/Math/Matrix.h +++ b/src/Math/Matrix.h @@ -60,12 +60,7 @@ template class Matrix { inline constexpr static Matrix& from(T* data) { return *reinterpret_cast*>(data); } - - /** - * @copybrief from(T*) - * @copydetails from(T*) - * @todoc Remove workaround when Doxygen supports \@copydoc again - */ + /** @overload */ inline constexpr static const Matrix& from(const T* data) { return *reinterpret_cast*>(data); } @@ -133,24 +128,13 @@ template class Matrix { * order. */ inline T* data() { return _data; } - - /** - * @copybrief data() - * @copydetails data() - * @todoc Remove workaround when Doxygen supports \@copydoc again - */ - inline constexpr const T* data() const { return _data; } + inline constexpr const T* data() const { return _data; } /**< @overload */ /** @brief %Matrix column */ inline Vector& operator[](size_t col) { return Vector::from(_data+col*size); } - - /** - * @copybrief operator[]() - * @copydetails operator[]() - * @todoc Remove workaround when Doxygen supports \@copydoc again - */ + /** @overload */ inline constexpr const Vector& operator[](size_t col) const { return Vector::from(_data+col*size); } diff --git a/src/Math/Vector.h b/src/Math/Vector.h index c49c4d2f5..1a62a56f3 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -47,12 +47,7 @@ template class Vector { inline constexpr static Vector& from(T* data) { return *reinterpret_cast*>(data); } - - /** - * @copybrief from(T*) - * @copydetails from(T*) - * @todoc Remove workaround when Doxygen supports \@copydoc again - */ + /** @overload */ inline constexpr static const Vector& from(const T* data) { return *reinterpret_cast*>(data); } @@ -124,23 +119,11 @@ template class Vector { * @return Array with the same size as the vector */ inline T* data() { return _data; } - - /** - * @copybrief data() - * @copydetails data() - * @todoc Remove workaround when Doxygen supports \@copydoc again - */ - inline constexpr const T* data() const { return _data; } + inline constexpr const T* data() const { return _data; } /**< @overload */ /** @brief Value at given position */ inline T& operator[](size_t pos) { return _data[pos]; } - - /** - * @copybrief operator[]() - * @copydetails operator[]() - * @todoc Remove workaround when Doxygen supports \@copydoc again - */ - inline constexpr T operator[](size_t pos) const { return _data[pos]; } + inline constexpr T operator[](size_t pos) const { return _data[pos]; } /**< @overload */ /** @brief Equality operator */ inline bool operator==(const Vector& other) const { diff --git a/src/Trade/MeshData.h b/src/Trade/MeshData.h index d13d174bf..ff62e67c0 100644 --- a/src/Trade/MeshData.h +++ b/src/Trade/MeshData.h @@ -60,7 +60,7 @@ class MAGNUM_EXPORT MeshData { * @return Indices or nullptr if the mesh is not indexed. */ inline std::vector* indices() { return _indices; } - inline const std::vector* indices() const { return _indices; } /**< @copydoc indices() */ + inline const std::vector* indices() const { return _indices; } /**< @overload */ /** @brief Count of vertex arrays */ inline size_t vertexArrayCount() const { return _vertices.size(); }; @@ -72,7 +72,7 @@ class MAGNUM_EXPORT MeshData { * ID. */ inline std::vector* vertices(size_t id) { return _vertices[id]; } - inline const std::vector* vertices(size_t id) const { return _vertices[id]; } /**< @copydoc vertices() */ + inline const std::vector* vertices(size_t id) const { return _vertices[id]; } /**< @overload */ /** @brief Count of normal arrays */ inline size_t normalArrayCount() const { return _normals.size(); }; @@ -84,7 +84,7 @@ class MAGNUM_EXPORT MeshData { * ID. */ inline std::vector* normals(size_t id) { return _normals[id]; } - inline const std::vector* normals(size_t id) const { return _normals[id]; } /**< @copydoc normals() */ + inline const std::vector* normals(size_t id) const { return _normals[id]; } /**< @overload */ /** @brief Count of 2D texture coordinate arrays */ inline size_t textureCoords2DArrayCount() const { return _textureCoords2D.size(); }; @@ -96,7 +96,7 @@ class MAGNUM_EXPORT MeshData { * coordinates array with given ID. */ inline std::vector* textureCoords2D(size_t id) { return _textureCoords2D[id]; } - inline const std::vector* textureCoords2D(size_t id) const { return _textureCoords2D[id]; } /**< @copydoc textureCoords2D() */ + inline const std::vector* textureCoords2D(size_t id) const { return _textureCoords2D[id]; } /**< @overload */ private: Mesh::Primitive _primitive;