From 777b4068403ee47eacccbeb38a3830d3789baaf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 25 May 2013 23:31:30 +0200 Subject: [PATCH] Trade: removed redundant `inline` keyword. --- src/Trade/AbstractImporter.h | 28 ++++++++++++++-------------- src/Trade/AbstractMaterialData.h | 2 +- src/Trade/ImageData.h | 10 +++++----- src/Trade/MeshData2D.h | 18 +++++++++--------- src/Trade/MeshData3D.h | 24 ++++++++++++------------ src/Trade/MeshObjectData2D.h | 2 +- src/Trade/MeshObjectData3D.h | 2 +- src/Trade/ObjectData2D.h | 8 ++++---- src/Trade/ObjectData3D.h | 10 +++++----- src/Trade/PhongMaterialData.h | 8 ++++---- src/Trade/SceneData.h | 4 ++-- 11 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/Trade/AbstractImporter.h b/src/Trade/AbstractImporter.h index 35a79e361..eb4a7bb9a 100644 --- a/src/Trade/AbstractImporter.h +++ b/src/Trade/AbstractImporter.h @@ -98,7 +98,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * Convenience alternative to above function useful when array size is * known at compile-time. */ - template inline bool openData(const T(&data)[size]) { + template bool openData(const T(&data)[size]) { return openData(data, size*sizeof(T)); } @@ -129,10 +129,10 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { * @note The function is not const, because the value will probably * be lazy-populated. */ - virtual inline Int defaultScene() { return -1; } + virtual Int defaultScene() { return -1; } /** @brief %Scene count */ - virtual inline UnsignedInt sceneCount() const { return 0; } + virtual UnsignedInt sceneCount() const { return 0; } /** * @brief %Scene ID for given name @@ -160,7 +160,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { virtual SceneData* scene(UnsignedInt id); /** @brief %Light count */ - virtual inline UnsignedInt lightCount() const { return 0; } + virtual UnsignedInt lightCount() const { return 0; } /** * @brief %Light ID for given name @@ -188,7 +188,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { virtual LightData* light(UnsignedInt id); /** @brief Camera count */ - virtual inline UnsignedInt cameraCount() const { return 0; } + virtual UnsignedInt cameraCount() const { return 0; } /** * @brief Camera ID for given name @@ -216,7 +216,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { virtual CameraData* camera(UnsignedInt id); /** @brief Two-dimensional object count */ - virtual inline UnsignedInt object2DCount() const { return 0; } + virtual UnsignedInt object2DCount() const { return 0; } /** * @brief Two-dimensional object ID for given name @@ -244,7 +244,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { virtual ObjectData2D* object2D(UnsignedInt id); /** @brief Three-dimensional object count */ - virtual inline UnsignedInt object3DCount() const { return 0; } + virtual UnsignedInt object3DCount() const { return 0; } /** * @brief Three-dimensional object ID for given name @@ -272,7 +272,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { virtual ObjectData3D* object3D(UnsignedInt id); /** @brief Two-dimensional mesh count */ - virtual inline UnsignedInt mesh2DCount() const { return 0; } + virtual UnsignedInt mesh2DCount() const { return 0; } /** * @brief Two-dimensional mesh ID for given name @@ -300,7 +300,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { virtual MeshData2D* mesh2D(UnsignedInt id); /** @brief Three-dimensional mesh count */ - virtual inline UnsignedInt mesh3DCount() const { return 0; } + virtual UnsignedInt mesh3DCount() const { return 0; } /** * @brief Three-dimensional mesh ID for given name @@ -328,7 +328,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { virtual MeshData3D* mesh3D(UnsignedInt id); /** @brief Material count */ - virtual inline UnsignedInt materialCount() const { return 0; } + virtual UnsignedInt materialCount() const { return 0; } /** * @brief Material ID for given name @@ -356,7 +356,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { virtual AbstractMaterialData* material(UnsignedInt id); /** @brief %Texture count */ - virtual inline UnsignedInt textureCount() const { return 0; } + virtual UnsignedInt textureCount() const { return 0; } /** * @brief %Texture ID for given name @@ -384,7 +384,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { virtual TextureData* texture(UnsignedInt id); /** @brief One-dimensional image count */ - virtual inline UnsignedInt image1DCount() const { return 0; } + virtual UnsignedInt image1DCount() const { return 0; } /** * @brief One-dimensional image ID for given name @@ -412,7 +412,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { virtual ImageData1D* image1D(UnsignedInt id); /** @brief Two-dimensional image count */ - virtual inline UnsignedInt image2DCount() const { return 0; } + virtual UnsignedInt image2DCount() const { return 0; } /** * @brief Two-dimensional image ID for given name @@ -440,7 +440,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin { virtual ImageData2D* image2D(UnsignedInt id); /** @brief Three-dimensional image count */ - virtual inline UnsignedInt image3DCount() const { return 0; } + virtual UnsignedInt image3DCount() const { return 0; } /** * @brief Three-dimensional image ID for given name diff --git a/src/Trade/AbstractMaterialData.h b/src/Trade/AbstractMaterialData.h index 7b26ee0b8..4c4cd9903 100644 --- a/src/Trade/AbstractMaterialData.h +++ b/src/Trade/AbstractMaterialData.h @@ -59,7 +59,7 @@ class MAGNUM_EXPORT AbstractMaterialData { virtual ~AbstractMaterialData() = 0; /** @brief Material type */ - inline Type type() const { return _type; } + Type type() const { return _type; } private: Type _type; diff --git a/src/Trade/ImageData.h b/src/Trade/ImageData.h index 66e110148..ab134a96a 100644 --- a/src/Trade/ImageData.h +++ b/src/Trade/ImageData.h @@ -55,17 +55,17 @@ template class ImageData: public AbstractImage { * Note that the image data are not copied on construction, but they * are deleted on class destruction. */ - inline explicit ImageData(const typename DimensionTraits::VectorType& size, ImageFormat format, ImageType type, void* data): AbstractImage(format, type), _size(size), _data(reinterpret_cast(data)) {} + explicit ImageData(const typename DimensionTraits::VectorType& size, ImageFormat format, ImageType type, void* data): AbstractImage(format, type), _size(size), _data(reinterpret_cast(data)) {} /** @brief Destructor */ - inline ~ImageData() { delete[] _data; } + ~ImageData() { delete[] _data; } /** @brief %Image size */ - inline typename DimensionTraits::VectorType size() const { return _size; } + typename DimensionTraits::VectorType size() const { return _size; } /** @brief Pointer to raw data */ - inline unsigned char* data() { return _data; } - inline const unsigned char* data() const { return _data; } /**< @overload */ + unsigned char* data() { return _data; } + const unsigned char* data() const { return _data; } /**< @overload */ private: Math::Vector _size; diff --git a/src/Trade/MeshData2D.h b/src/Trade/MeshData2D.h index 97369a79e..d8a910460 100644 --- a/src/Trade/MeshData2D.h +++ b/src/Trade/MeshData2D.h @@ -68,17 +68,17 @@ class MAGNUM_EXPORT MeshData2D { MeshData2D& operator=(MeshData2D&&); /** @brief Primitive */ - inline Mesh::Primitive primitive() const { return _primitive; } + Mesh::Primitive primitive() const { return _primitive; } /** * @brief Indices * @return Indices or nullptr if the mesh is not indexed. */ - inline std::vector* indices() { return _indices; } - inline const std::vector* indices() const { return _indices; } /**< @overload */ + std::vector* indices() { return _indices; } + const std::vector* indices() const { return _indices; } /**< @overload */ /** @brief Count of vertex position arrays */ - inline UnsignedInt positionArrayCount() const { return _positions.size(); } + UnsignedInt positionArrayCount() const { return _positions.size(); } /** * @brief Positions @@ -86,11 +86,11 @@ class MAGNUM_EXPORT MeshData2D { * @return Positions or nullptr if there is no vertex array with given * ID. */ - inline std::vector* positions(UnsignedInt id) { return _positions[id]; } - inline const std::vector* positions(UnsignedInt id) const { return _positions[id]; } /**< @overload */ + std::vector* positions(UnsignedInt id) { return _positions[id]; } + const std::vector* positions(UnsignedInt id) const { return _positions[id]; } /**< @overload */ /** @brief Count of 2D texture coordinate arrays */ - inline UnsignedInt textureCoords2DArrayCount() const { return _textureCoords2D.size(); } + UnsignedInt textureCoords2DArrayCount() const { return _textureCoords2D.size(); } /** * @brief 2D texture coordinates @@ -98,8 +98,8 @@ class MAGNUM_EXPORT MeshData2D { * @return %Texture coordinates or nullptr if there is no texture * coordinates array with given ID. */ - inline std::vector* textureCoords2D(UnsignedInt id) { return _textureCoords2D[id]; } - inline const std::vector* textureCoords2D(UnsignedInt id) const { return _textureCoords2D[id]; } /**< @overload */ + std::vector* textureCoords2D(UnsignedInt id) { return _textureCoords2D[id]; } + const std::vector* textureCoords2D(UnsignedInt id) const { return _textureCoords2D[id]; } /**< @overload */ private: Mesh::Primitive _primitive; diff --git a/src/Trade/MeshData3D.h b/src/Trade/MeshData3D.h index 61e02e807..64271f2a0 100644 --- a/src/Trade/MeshData3D.h +++ b/src/Trade/MeshData3D.h @@ -69,17 +69,17 @@ class MAGNUM_EXPORT MeshData3D { MeshData3D& operator=(MeshData3D&&); /** @brief Primitive */ - inline Mesh::Primitive primitive() const { return _primitive; } + Mesh::Primitive primitive() const { return _primitive; } /** * @brief Indices * @return Indices or nullptr if the mesh is not indexed. */ - inline std::vector* indices() { return _indices; } - inline const std::vector* indices() const { return _indices; } /**< @overload */ + std::vector* indices() { return _indices; } + const std::vector* indices() const { return _indices; } /**< @overload */ /** @brief Count of vertex position arrays */ - inline UnsignedInt positionArrayCount() const { return _positions.size(); } + UnsignedInt positionArrayCount() const { return _positions.size(); } /** * @brief Positions @@ -87,11 +87,11 @@ class MAGNUM_EXPORT MeshData3D { * @return Positions or nullptr if there is no vertex array with given * ID. */ - inline std::vector* positions(UnsignedInt id) { return _positions[id]; } - inline const std::vector* positions(UnsignedInt id) const { return _positions[id]; } /**< @overload */ + std::vector* positions(UnsignedInt id) { return _positions[id]; } + const std::vector* positions(UnsignedInt id) const { return _positions[id]; } /**< @overload */ /** @brief Count of normal arrays */ - inline UnsignedInt normalArrayCount() const { return _normals.size(); } + UnsignedInt normalArrayCount() const { return _normals.size(); } /** * @brief Normals @@ -99,11 +99,11 @@ class MAGNUM_EXPORT MeshData3D { * @return Normals or nullptr if there is no normal array with given * ID. */ - inline std::vector* normals(UnsignedInt id) { return _normals[id]; } - inline const std::vector* normals(UnsignedInt id) const { return _normals[id]; } /**< @overload */ + std::vector* normals(UnsignedInt id) { return _normals[id]; } + const std::vector* normals(UnsignedInt id) const { return _normals[id]; } /**< @overload */ /** @brief Count of 2D texture coordinate arrays */ - inline UnsignedInt textureCoords2DArrayCount() const { return _textureCoords2D.size(); } + UnsignedInt textureCoords2DArrayCount() const { return _textureCoords2D.size(); } /** * @brief 2D texture coordinates @@ -111,8 +111,8 @@ class MAGNUM_EXPORT MeshData3D { * @return %Texture coordinates or nullptr if there is no texture * coordinates array with given ID. */ - inline std::vector* textureCoords2D(UnsignedInt id) { return _textureCoords2D[id]; } - inline const std::vector* textureCoords2D(UnsignedInt id) const { return _textureCoords2D[id]; } /**< @overload */ + std::vector* textureCoords2D(UnsignedInt id) { return _textureCoords2D[id]; } + const std::vector* textureCoords2D(UnsignedInt id) const { return _textureCoords2D[id]; } /**< @overload */ private: Mesh::Primitive _primitive; diff --git a/src/Trade/MeshObjectData2D.h b/src/Trade/MeshObjectData2D.h index bbe38cd0c..b250e28df 100644 --- a/src/Trade/MeshObjectData2D.h +++ b/src/Trade/MeshObjectData2D.h @@ -57,7 +57,7 @@ class MAGNUM_EXPORT MeshObjectData2D: public ObjectData2D { explicit MeshObjectData2D(std::vector children, const Matrix3& transformation, UnsignedInt instance, UnsignedInt material); /** @brief Material ID */ - inline UnsignedInt material() const { return _material; } + UnsignedInt material() const { return _material; } private: UnsignedInt _material; diff --git a/src/Trade/MeshObjectData3D.h b/src/Trade/MeshObjectData3D.h index 636ad52b1..e29250553 100644 --- a/src/Trade/MeshObjectData3D.h +++ b/src/Trade/MeshObjectData3D.h @@ -57,7 +57,7 @@ class MAGNUM_EXPORT MeshObjectData3D: public ObjectData3D { explicit MeshObjectData3D(std::vector children, const Matrix4& transformation, UnsignedInt instance, UnsignedInt material); /** @brief Material ID */ - inline UnsignedInt material() const { return _material; } + UnsignedInt material() const { return _material; } private: UnsignedInt _material; diff --git a/src/Trade/ObjectData2D.h b/src/Trade/ObjectData2D.h index 46d2305f3..ec44b0181 100644 --- a/src/Trade/ObjectData2D.h +++ b/src/Trade/ObjectData2D.h @@ -76,10 +76,10 @@ class MAGNUM_EXPORT ObjectData2D { virtual ~ObjectData2D(); /** @brief Child objects */ - inline std::vector& children() { return _children; } + std::vector& children() { return _children; } /** @brief Transformation (relative to parent) */ - inline Matrix3 transformation() const { return _transformation; } + Matrix3 transformation() const { return _transformation; } /** * @brief Instance type @@ -88,14 +88,14 @@ class MAGNUM_EXPORT ObjectData2D { * If the instance is of type InstanceType::Mesh, the instance can be * casted to MeshObjectData2D and provide more information. */ - inline InstanceType instanceType() const { return _instanceType; } + InstanceType instanceType() const { return _instanceType; } /** * @brief Instance ID * @return ID of given camera / light / mesh etc., specified by * instanceType() */ - inline Int instanceId() const { return _instanceId; } + Int instanceId() const { return _instanceId; } private: std::vector _children; diff --git a/src/Trade/ObjectData3D.h b/src/Trade/ObjectData3D.h index f6ac02923..a2ccffe21 100644 --- a/src/Trade/ObjectData3D.h +++ b/src/Trade/ObjectData3D.h @@ -74,13 +74,13 @@ class MAGNUM_EXPORT ObjectData3D { explicit ObjectData3D(std::vector children, const Matrix4& transformation); /** @brief Destructor */ - inline virtual ~ObjectData3D() {} + virtual ~ObjectData3D() {} /** @brief Child objects */ - inline std::vector& children() { return _children; } + std::vector& children() { return _children; } /** @brief Transformation (relative to parent) */ - inline Matrix4 transformation() const { return _transformation; } + Matrix4 transformation() const { return _transformation; } /** * @brief Instance type @@ -89,14 +89,14 @@ class MAGNUM_EXPORT ObjectData3D { * If the instance is of type InstanceType::Mesh, the instance can be * casted to MeshObjectData3D and provide more information. */ - inline InstanceType instanceType() const { return _instanceType; } + InstanceType instanceType() const { return _instanceType; } /** * @brief Instance ID * @return ID of given camera / light / mesh etc., specified by * instanceType() */ - inline Int instanceId() const { return _instanceId; } + Int instanceId() const { return _instanceId; } private: std::vector _children; diff --git a/src/Trade/PhongMaterialData.h b/src/Trade/PhongMaterialData.h index dec88b406..d648c51ee 100644 --- a/src/Trade/PhongMaterialData.h +++ b/src/Trade/PhongMaterialData.h @@ -49,16 +49,16 @@ class MAGNUM_EXPORT PhongMaterialData: public AbstractMaterialData { explicit PhongMaterialData(const Vector3& ambientColor, const Vector3& diffuseColor, const Vector3& specularColor, Float shininess); /** @brief Ambient color */ - inline Vector3 ambientColor() const { return _ambientColor; } + Vector3 ambientColor() const { return _ambientColor; } /** @brief Diffuse color */ - inline Vector3 diffuseColor() const { return _diffuseColor; } + Vector3 diffuseColor() const { return _diffuseColor; } /** @brief Specular color */ - inline Vector3 specularColor() const { return _specularColor; } + Vector3 specularColor() const { return _specularColor; } /** @brief Shininess */ - inline Float shininess() const { return _shininess; } + Float shininess() const { return _shininess; } private: Vector3 _ambientColor, diff --git a/src/Trade/SceneData.h b/src/Trade/SceneData.h index 66b33c21a..ba81ff8c8 100644 --- a/src/Trade/SceneData.h +++ b/src/Trade/SceneData.h @@ -54,10 +54,10 @@ class MAGNUM_EXPORT SceneData { explicit SceneData(std::vector children2D, std::vector children3D); /** @brief Two-dimensional child objects */ - inline const std::vector& children2D() const { return _children2D; } + const std::vector& children2D() const { return _children2D; } /** @brief Three-dimensional child objects */ - inline const std::vector& children3D() const { return _children3D; } + const std::vector& children3D() const { return _children3D; } private: std::vector _children2D,