diff --git a/src/Array.h b/src/Array.h index 22b8288a5..2788fcfc3 100644 --- a/src/Array.h +++ b/src/Array.h @@ -23,6 +23,8 @@ #include #include +#include "Magnum.h" + namespace Magnum { /** @@ -179,30 +181,30 @@ template class Array3D: public Array<3, T> { }; /** @debugoperator{Magnum::Array} */ -template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Array& value) { +template Debug operator<<(Debug debug, const Array& value) { debug << "Array("; - debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); + debug.setFlag(Debug::SpaceAfterEachValue, false); for(std::uint8_t i = 0; i != dimensions; ++i) { if(i != 0) debug << ", "; debug << value[i]; } debug << ")"; - debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, true); + debug.setFlag(Debug::SpaceAfterEachValue, true); return debug; } /** @debugoperator{Magnum::Array1D} */ -template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Array1D& value) { +template inline Debug operator<<(Debug debug, const Array1D& value) { return debug << static_cast&>(value); } /** @debugoperator{Magnum::Array2D} */ -template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Array2D& value) { +template inline Debug operator<<(Debug debug, const Array2D& value) { return debug << static_cast&>(value); } /** @debugoperator{Magnum::Array3D} */ -template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Array3D& value) { +template inline Debug operator<<(Debug debug, const Array3D& value) { return debug << static_cast&>(value); } diff --git a/src/Color.h b/src/Color.h index 145a6c5bc..cd5ac19ee 100644 --- a/src/Color.h +++ b/src/Color.h @@ -375,12 +375,12 @@ class Color4: public Math::Vector4 { MAGNUM_VECTOR_SUBCLASS_OPERATOR_IMPLEMENTATION(Color4, 4) /** @debugoperator{Magnum::Color3} */ -template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Color3& value) { +template inline Debug operator<<(Debug debug, const Color3& value) { return debug << static_cast&>(value); } /** @debugoperator{Magnum::Color4} */ -template inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Color4& value) { +template inline Debug operator<<(Debug debug, const Color4& value) { return debug << static_cast&>(value); } diff --git a/src/Math/Geometry/Test/RectangleTest.cpp b/src/Math/Geometry/Test/RectangleTest.cpp index 267dc724b..84c8b2567 100644 --- a/src/Math/Geometry/Test/RectangleTest.cpp +++ b/src/Math/Geometry/Test/RectangleTest.cpp @@ -87,7 +87,7 @@ void RectangleTest::size() { void RectangleTest::debug() { std::ostringstream o; - Corrade::Utility::Debug(&o) << Rectanglei({34, 23}, {47, 30}); + Debug(&o) << Rectanglei({34, 23}, {47, 30}); CORRADE_COMPARE(o.str(), "Rectangle({34, 23}, {47, 30})\n"); } diff --git a/src/Math/Test/BoolVectorTest.cpp b/src/Math/Test/BoolVectorTest.cpp index b430f6d02..f2b1c4e75 100644 --- a/src/Math/Test/BoolVectorTest.cpp +++ b/src/Math/Test/BoolVectorTest.cpp @@ -156,7 +156,7 @@ void BoolVectorTest::bitAndOrXor() { void BoolVectorTest::debug() { std::ostringstream o; - Corrade::Utility::Debug(&o) << BoolVector19(0x25, 0x53, 0x02); + Debug(&o) << BoolVector19(0x25, 0x53, 0x02); CORRADE_COMPARE(o.str(), "BoolVector(10100100 11001010 010)\n"); } diff --git a/src/Math/Test/Matrix3Test.cpp b/src/Math/Test/Matrix3Test.cpp index aae9352a2..e5e57e11c 100644 --- a/src/Math/Test/Matrix3Test.cpp +++ b/src/Math/Test/Matrix3Test.cpp @@ -20,8 +20,6 @@ #include "Math/Constants.h" #include "Math/Matrix3.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Math { namespace Test { class Matrix3Test: public Corrade::TestSuite::Tester { @@ -218,7 +216,7 @@ void Matrix3Test::debug() { } void Matrix3Test::configuration() { - Configuration c; + Corrade::Utility::Configuration c; Matrix3 m({5.0f, 8.0f, 4.0f}, {4.0f, 7.0f, 3.125f}, diff --git a/src/Math/Test/Matrix4Test.cpp b/src/Math/Test/Matrix4Test.cpp index e3734870e..24c0debd2 100644 --- a/src/Math/Test/Matrix4Test.cpp +++ b/src/Math/Test/Matrix4Test.cpp @@ -20,8 +20,6 @@ #include "Math/Constants.h" #include "Math/Matrix4.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Math { namespace Test { class Matrix4Test: public Corrade::TestSuite::Tester { @@ -294,7 +292,7 @@ void Matrix4Test::debug() { } void Matrix4Test::configuration() { - Configuration c; + Corrade::Utility::Configuration c; Matrix4 m({3.0f, 5.0f, 8.0f, 4.0f}, {4.0f, 4.0f, 7.0f, 3.125f}, diff --git a/src/Math/Test/MatrixTest.cpp b/src/Math/Test/MatrixTest.cpp index 8b377e915..330a86b04 100644 --- a/src/Math/Test/MatrixTest.cpp +++ b/src/Math/Test/MatrixTest.cpp @@ -19,8 +19,6 @@ #include "Math/Matrix.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Math { namespace Test { class MatrixTest: public Corrade::TestSuite::Tester { @@ -182,7 +180,7 @@ void MatrixTest::debug() { } void MatrixTest::configuration() { - Configuration c; + Corrade::Utility::Configuration c; Matrix4 m(Vector4(3.0f, 5.0f, 8.0f, 4.0f), Vector4(4.0f, 4.0f, 7.0f, 3.125f), diff --git a/src/Math/Test/Point2DTest.cpp b/src/Math/Test/Point2DTest.cpp index f69179c37..e3e29e9c3 100644 --- a/src/Math/Test/Point2DTest.cpp +++ b/src/Math/Test/Point2DTest.cpp @@ -19,8 +19,6 @@ #include "Math/Point2D.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Math { namespace Test { class Point2DTest: public Corrade::TestSuite::Tester { @@ -53,7 +51,7 @@ void Point2DTest::debug() { } void Point2DTest::configuration() { - Configuration c; + Corrade::Utility::Configuration c; Point2D vec(3.0f, 3.125f, 9.55f); std::string value("3 3.125 9.55"); diff --git a/src/Math/Test/Point3DTest.cpp b/src/Math/Test/Point3DTest.cpp index 4617b6fbc..9ac4f30c0 100644 --- a/src/Math/Test/Point3DTest.cpp +++ b/src/Math/Test/Point3DTest.cpp @@ -19,8 +19,6 @@ #include "Math/Point3D.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Math { namespace Test { class Point3DTest: public Corrade::TestSuite::Tester { @@ -53,7 +51,7 @@ void Point3DTest::debug() { } void Point3DTest::configuration() { - Configuration c; + Corrade::Utility::Configuration c; Point3D vec(3.0f, 3.125f, 9.0f, 9.55f); std::string value("3 3.125 9 9.55"); diff --git a/src/Math/Test/QuaternionTest.cpp b/src/Math/Test/QuaternionTest.cpp index 40176ec9f..078efc9db 100644 --- a/src/Math/Test/QuaternionTest.cpp +++ b/src/Math/Test/QuaternionTest.cpp @@ -250,7 +250,7 @@ void QuaternionTest::slerp() { void QuaternionTest::debug() { std::ostringstream o; - Corrade::Utility::Debug(&o) << Quaternion({1.0f, 2.0f, 3.0f}, -4.0f); + Debug(&o) << Quaternion({1.0f, 2.0f, 3.0f}, -4.0f); CORRADE_COMPARE(o.str(), "Quaternion({1, 2, 3}, -4)\n"); } diff --git a/src/Math/Test/RectangularMatrixTest.cpp b/src/Math/Test/RectangularMatrixTest.cpp index 78d867199..53d74418c 100644 --- a/src/Math/Test/RectangularMatrixTest.cpp +++ b/src/Math/Test/RectangularMatrixTest.cpp @@ -19,8 +19,6 @@ #include "Math/RectangularMatrix.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Math { namespace Test { class RectangularMatrixTest: public Corrade::TestSuite::Tester { @@ -314,7 +312,7 @@ void RectangularMatrixTest::configuration() { Vector4(7.0f, -1.0f, 8.0f, 9.55f)); std::string value("3 4 7 5 4 -1 8 7 8 4 3.125 9.55"); - Configuration c; + Corrade::Utility::Configuration c; c.setValue("matrix", m); CORRADE_COMPARE(c.value("matrix"), value); diff --git a/src/Math/Test/Vector2Test.cpp b/src/Math/Test/Vector2Test.cpp index 729281509..4314ee219 100644 --- a/src/Math/Test/Vector2Test.cpp +++ b/src/Math/Test/Vector2Test.cpp @@ -19,8 +19,6 @@ #include "Math/Vector2.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Math { namespace Test { class Vector2Test: public Corrade::TestSuite::Tester { @@ -78,7 +76,7 @@ void Vector2Test::debug() { } void Vector2Test::configuration() { - Configuration c; + Corrade::Utility::Configuration c; Vector2 vec(3.125f, 9.0f); std::string value("3.125 9"); diff --git a/src/Math/Test/Vector3Test.cpp b/src/Math/Test/Vector3Test.cpp index c4a7a2c03..36204c764 100644 --- a/src/Math/Test/Vector3Test.cpp +++ b/src/Math/Test/Vector3Test.cpp @@ -19,8 +19,6 @@ #include "Math/Vector3.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Math { namespace Test { class Vector3Test: public Corrade::TestSuite::Tester { @@ -100,7 +98,7 @@ void Vector3Test::debug() { } void Vector3Test::configuration() { - Configuration c; + Corrade::Utility::Configuration c; Vector3 vec(3.0f, 3.125f, 9.55f); std::string value("3 3.125 9.55"); diff --git a/src/Math/Test/Vector4Test.cpp b/src/Math/Test/Vector4Test.cpp index b1606c230..a5d5953ae 100644 --- a/src/Math/Test/Vector4Test.cpp +++ b/src/Math/Test/Vector4Test.cpp @@ -19,8 +19,6 @@ #include "Math/Vector4.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Math { namespace Test { class Vector4Test: public Corrade::TestSuite::Tester { @@ -84,7 +82,7 @@ void Vector4Test::debug() { } void Vector4Test::configuration() { - Configuration c; + Corrade::Utility::Configuration c; Vector4 vec(3.0f, 3.125f, 9.0f, 9.55f); std::string value("3 3.125 9 9.55"); diff --git a/src/Math/Test/VectorTest.cpp b/src/Math/Test/VectorTest.cpp index 4f66d1342..2e8a2561f 100644 --- a/src/Math/Test/VectorTest.cpp +++ b/src/Math/Test/VectorTest.cpp @@ -20,8 +20,6 @@ #include "Math/Constants.h" #include "Math/Vector.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Math { namespace Test { class VectorTest: public Corrade::TestSuite::Tester { @@ -269,7 +267,7 @@ void VectorTest::debug() { } void VectorTest::configuration() { - Configuration c; + Corrade::Utility::Configuration c; Vector4 vec(3.0f, 3.125f, 9.0f, 9.55f); std::string value("3 3.125 9 9.55"); diff --git a/src/Resource.h b/src/Resource.h index 7b94a491e..88dbb415b 100644 --- a/src/Resource.h +++ b/src/Resource.h @@ -90,7 +90,7 @@ class ResourceKey: public Corrade::Utility::MurmurHash2::Digest { }; /** @debugoperator{Magnum::ResourceKey} */ -inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const ResourceKey& value) { +inline Debug operator<<(Debug debug, const ResourceKey& value) { return debug << static_cast&>(value); } diff --git a/src/Test/ColorTest.cpp b/src/Test/ColorTest.cpp index 959bc7144..d2dfb0526 100644 --- a/src/Test/ColorTest.cpp +++ b/src/Test/ColorTest.cpp @@ -19,8 +19,6 @@ #include "Color.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Test { class ColorTest: public Corrade::TestSuite::Tester { @@ -170,7 +168,7 @@ void ColorTest::debug() { } void ColorTest::configuration() { - Configuration c; + Corrade::Utility::Configuration c; Color3f color3(0.5f, 0.75f, 1.0f); std::string value3("0.5 0.75 1"); diff --git a/src/Test/MeshTest.cpp b/src/Test/MeshTest.cpp index 5850c68b5..f436c305c 100644 --- a/src/Test/MeshTest.cpp +++ b/src/Test/MeshTest.cpp @@ -19,8 +19,6 @@ #include "Mesh.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Test { class MeshTest: public Corrade::TestSuite::Tester { @@ -53,7 +51,7 @@ void MeshTest::debugIndexType() { } void MeshTest::configurationPrimitive() { - Configuration c; + Corrade::Utility::Configuration c; c.setValue("primitive", Mesh::Primitive::LineStrip); CORRADE_COMPARE(c.value("primitive"), "LineStrip"); @@ -61,7 +59,7 @@ void MeshTest::configurationPrimitive() { } void MeshTest::configurationIndexType() { - Configuration c; + Corrade::Utility::Configuration c; c.setValue("type", Mesh::IndexType::UnsignedByte); CORRADE_COMPARE(c.value("type"), "UnsignedByte"); diff --git a/src/Test/ResourceManagerTest.cpp b/src/Test/ResourceManagerTest.cpp index fb676037d..25ec60ac4 100644 --- a/src/Test/ResourceManagerTest.cpp +++ b/src/Test/ResourceManagerTest.cpp @@ -21,8 +21,6 @@ #include "corradeCompatibility.h" -using namespace Corrade::Utility; - namespace Magnum { namespace Test { class ResourceManagerTest: public Corrade::TestSuite::Tester { diff --git a/src/Trade/AbstractImporter.cpp b/src/Trade/AbstractImporter.cpp index 1ccf4da86..9c0419253 100644 --- a/src/Trade/AbstractImporter.cpp +++ b/src/Trade/AbstractImporter.cpp @@ -17,7 +17,7 @@ #include -using namespace Corrade::Utility; +#include "Magnum.h" namespace Magnum { namespace Trade {