diff --git a/src/BufferedImage.h b/src/BufferedImage.h index 76a244008..0de313b24 100644 --- a/src/BufferedImage.h +++ b/src/BufferedImage.h @@ -47,7 +47,7 @@ template class BufferedImage: public AbstractImage { * Dimensions and buffer are empty, call setData() to fill the image * with data. */ - BufferedImage(Components components, ComponentType type): AbstractImage(components, type), _buffer(Buffer::Target::PixelPack) {} + inline BufferedImage(Components components, ComponentType type): AbstractImage(components, type), _buffer(Buffer::Target::PixelPack) {} /** @brief %Image dimensions */ inline constexpr Math::Vector dimensions() const { return _dimensions; } @@ -61,7 +61,7 @@ template class BufferedImage: public AbstractImage { * * @see Buffer::bind(Target) */ - void* data() { + inline void* data() { _buffer.bind(Buffer::Target::PixelUnpack); return nullptr; } diff --git a/src/Color.h b/src/Color.h index 4245f4ece..bafd9c58f 100644 --- a/src/Color.h +++ b/src/Color.h @@ -406,12 +406,12 @@ template class Color4: public Math::Vector4 { MAGNUM_VECTOR_SUBCLASS_OPERATOR_IMPLEMENTATION(Color4, 4) /** @debugoperator{Magnum::Color3} */ -template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Color3& value) { +template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Color3& value) { return debug << static_cast&>(value); } /** @debugoperator{Magnum::Color4} */ -template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Color4& value) { +template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Color4& value) { return debug << static_cast&>(value); } diff --git a/src/ImageWrapper.h b/src/ImageWrapper.h index d625f7a6f..d8c0370a7 100644 --- a/src/ImageWrapper.h +++ b/src/ImageWrapper.h @@ -93,7 +93,7 @@ template class ImageWrapper: public AbstractImage { * passed in constructor. The data are not copied nor deleted on * destruction. */ - void setData(GLvoid* data) { + inline void setData(GLvoid* data) { _data = reinterpret_cast(data); } diff --git a/src/Math/Matrix.h b/src/Math/Matrix.h index 4f9d71907..e812971d7 100644 --- a/src/Math/Matrix.h +++ b/src/Math/Matrix.h @@ -168,7 +168,7 @@ template inline typename std::enable_if Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Matrix& value) { +template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Matrix& value) { return debug << static_cast&>(value); } diff --git a/src/Math/Matrix3.h b/src/Math/Matrix3.h index 8078198bc..4c7e4fd05 100644 --- a/src/Math/Matrix3.h +++ b/src/Math/Matrix3.h @@ -149,7 +149,7 @@ template class Matrix3: public Matrix<3, T> { }; /** @debugoperator{Magnum::Math::Matrix3} */ -template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Matrix3& value) { +template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Matrix3& value) { return debug << static_cast&>(value); } diff --git a/src/Math/Matrix4.h b/src/Math/Matrix4.h index 0ade48c5a..f067d6a59 100644 --- a/src/Math/Matrix4.h +++ b/src/Math/Matrix4.h @@ -249,7 +249,7 @@ template class Matrix4: public Matrix<4, T> { }; /** @debugoperator{Magnum::Math::Matrix4} */ -template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Matrix4& value) { +template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Matrix4& value) { return debug << static_cast&>(value); } diff --git a/src/Math/Point2D.h b/src/Math/Point2D.h index 896332e65..afd05e2d8 100644 --- a/src/Math/Point2D.h +++ b/src/Math/Point2D.h @@ -75,7 +75,7 @@ template class Point2D: public Vector3 { MAGNUM_VECTOR_SUBCLASS_OPERATOR_IMPLEMENTATION(Point2D, 3) /** @debugoperator{Magnum::Math::Point2D} */ -template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Point2D& value) { +template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Point2D& value) { return debug << static_cast&>(value); } diff --git a/src/Math/Point3D.h b/src/Math/Point3D.h index 511946b9b..68f2ef7b7 100644 --- a/src/Math/Point3D.h +++ b/src/Math/Point3D.h @@ -76,7 +76,7 @@ template class Point3D: public Vector4 { MAGNUM_VECTOR_SUBCLASS_OPERATOR_IMPLEMENTATION(Point3D, 4) /** @debugoperator{Magnum::Math::Point3D} */ -template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Point3D& value) { +template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Point3D& value) { return debug << static_cast&>(value); } diff --git a/src/Math/Vector.h b/src/Math/Vector.h index e427c6098..42f19ad0b 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -106,7 +106,7 @@ template class Vector: public RectangularMatrix<1, s, T> { * * @see operator*=(const Vector&) */ - Vector operator*(const Vector& other) const { + inline Vector operator*(const Vector& other) const { return Vector(*this)*=other; } @@ -128,7 +128,7 @@ template class Vector: public RectangularMatrix<1, s, T> { * * @see operator/=(const Vector&) */ - Vector operator/(const Vector& other) const { + inline Vector operator/(const Vector& other) const { return Vector(*this)/=other; } diff --git a/src/Math/Vector2.h b/src/Math/Vector2.h index 2b477a1f6..89279c042 100644 --- a/src/Math/Vector2.h +++ b/src/Math/Vector2.h @@ -95,7 +95,7 @@ template class Vector2: public Vector<2, T> { MAGNUM_VECTOR_SUBCLASS_OPERATOR_IMPLEMENTATION(Vector2, 2) /** @debugoperator{Magnum::Math::Vector2} */ -template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Vector2& value) { +template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Vector2& value) { return debug << static_cast&>(value); } diff --git a/src/Math/Vector3.h b/src/Math/Vector3.h index 373801918..b289d7453 100644 --- a/src/Math/Vector3.h +++ b/src/Math/Vector3.h @@ -149,7 +149,7 @@ template class Vector3: public Vector<3, T> { MAGNUM_VECTOR_SUBCLASS_OPERATOR_IMPLEMENTATION(Vector3, 3) /** @debugoperator{Magnum::Math::Vector3} */ -template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Vector3& value) { +template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Vector3& value) { return debug << static_cast&>(value); } diff --git a/src/Math/Vector4.h b/src/Math/Vector4.h index ef4eb762c..4ef0e3267 100644 --- a/src/Math/Vector4.h +++ b/src/Math/Vector4.h @@ -92,7 +92,7 @@ template class Vector4: public Vector<4, T> { MAGNUM_VECTOR_SUBCLASS_OPERATOR_IMPLEMENTATION(Vector4, 4) /** @debugoperator{Magnum::Math::Vector4} */ -template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Vector4& value) { +template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::Vector4& value) { return debug << static_cast&>(value); }