Browse Source

Use a common prefix for internal singles-related macros.

Matches the same change in Corrade.
pull/168/head
Vladimír Vondruš 3 years ago
parent
commit
eed2c818e9
  1. 4
      src/Magnum/Math/Angle.h
  2. 2
      src/Magnum/Math/Bezier.h
  3. 4
      src/Magnum/Math/BitVector.h
  4. 4
      src/Magnum/Math/Color.h
  5. 4
      src/Magnum/Math/Complex.h
  6. 2
      src/Magnum/Math/CubicHermite.h
  7. 4
      src/Magnum/Math/Dual.h
  8. 2
      src/Magnum/Math/DualComplex.h
  9. 2
      src/Magnum/Math/DualQuaternion.h
  10. 4
      src/Magnum/Math/Frustum.h
  11. 4
      src/Magnum/Math/Half.h
  12. 4
      src/Magnum/Math/Quaternion.h
  13. 2
      src/Magnum/Math/Range.h
  14. 2
      src/Magnum/Math/RectangularMatrix.h
  15. 4
      src/Magnum/Math/Vector.h
  16. 2
      src/singles/base.h

4
src/Magnum/Math/Angle.h

@ -29,7 +29,7 @@
* @brief Class @ref Magnum::Math::Deg, @ref Magnum::Math::Rad, literal @link Magnum::Math::Literals::operator""_degf() @endlink, @link Magnum::Math::Literals::operator""_radf() @endlink, @link Magnum::Math::Literals::operator""_deg() @endlink, @link Magnum::Math::Literals::operator""_rad() @endlink
*/
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
#include <Corrade/Utility/Debug.h>
#endif
@ -228,7 +228,7 @@ constexpr Rad<Float> operator "" _radf(long double value) { return Rad<Float>(Fl
template<class T> constexpr Deg<T>::Deg(Unit<Rad, T> value): Unit<Math::Deg, T>(T(180)*T(value)/Math::Constants<T>::pi()) {}
template<class T> constexpr Rad<T>::Rad(Unit<Deg, T> value): Unit<Math::Rad, T>(T(value)*Math::Constants<T>::pi()/T(180)) {}
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{Rad} */
template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Unit<Rad, T>& value) {
if(debug.immediateFlags() >= Corrade::Utility::Debug::Flag::Packed)

2
src/Magnum/Math/Bezier.h

@ -298,7 +298,7 @@ Convenience alternative to @cpp CubicBezier<3, T> @ce. See @ref CubicBezier and
template<class T> using CubicBezier3D = CubicBezier<3, T>;
#endif
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{Bezier} */
template<UnsignedInt order, UnsignedInt dimensions, class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Bezier<order, dimensions, T>& value) {
debug << "Bezier(" << Corrade::Utility::Debug::nospace;

4
src/Magnum/Math/BitVector.h

@ -32,7 +32,7 @@
#include <type_traits>
#include <Corrade/Containers/sequenceHelpers.h>
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
#include <Corrade/Utility/Debug.h>
#endif
@ -329,7 +329,7 @@ template<std::size_t size> class BitVector {
UnsignedByte _data[DataSize];
};
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/**
@debugoperator{BitVector}
@m_since_latest

4
src/Magnum/Math/Color.h

@ -1341,7 +1341,7 @@ template<class T> struct ColorHsv {
T value;
};
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{ColorHsv} */
template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const ColorHsv<T>& value) {
return debug << "ColorHsv(" << Corrade::Utility::Debug::nospace << value.hue
@ -1523,7 +1523,7 @@ inline Color4<Float> operator "" _srgbaf(unsigned long long value) {
}
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/**
@debugoperator{Color3}

4
src/Magnum/Math/Complex.h

@ -29,7 +29,7 @@
* @brief Class @ref Magnum::Math::Complex, function @ref Magnum::Math::dot(), @ref Magnum::Math::angle()
*/
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
#include <Corrade/Utility/Debug.h>
#endif
#include <Corrade/Utility/DebugAssert.h>
@ -657,7 +657,7 @@ template<class T> inline Complex<T> Complex<T>::fromMatrix(const Matrix2x2<T>& m
return Implementation::complexFromMatrix(matrix);
}
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{Complex} */
template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Complex<T>& value) {
return debug << "Complex(" << Corrade::Utility::Debug::nospace

2
src/Magnum/Math/CubicHermite.h

@ -278,7 +278,7 @@ Convenience alternative to @cpp CubicHermite<Quaternion<T>> @ce. See
template<class T> using CubicHermiteQuaternion = CubicHermite<Quaternion<T>>;
#endif
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{CubicHermite} */
template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const CubicHermite<T>& value) {
return debug << "CubicHermite(" << Corrade::Utility::Debug::nospace

4
src/Magnum/Math/Dual.h

@ -29,7 +29,7 @@
* @brief Class @ref Magnum::Math::Dual
*/
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
#include <Corrade/Utility/Debug.h>
#endif
#include <Corrade/Utility/StlMath.h>
@ -374,7 +374,7 @@ template<class T, class U, class V = typename std::enable_if<!Implementation::Is
}
#endif
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{Dual} */
template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Dual<T>& value) {
return debug << "Dual(" << Corrade::Utility::Debug::nospace

2
src/Magnum/Math/DualComplex.h

@ -403,7 +403,7 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
MAGNUM_DUAL_OPERATOR_IMPLEMENTATION(DualComplex, Vector2, T)
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{DualComplex} */
template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const DualComplex<T>& value) {
return debug << "DualComplex({" << Corrade::Utility::Debug::nospace

2
src/Magnum/Math/DualQuaternion.h

@ -567,7 +567,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
MAGNUM_DUAL_OPERATOR_IMPLEMENTATION(DualQuaternion, Quaternion, T)
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{DualQuaternion} */
template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const DualQuaternion<T>& value) {
return debug << "DualQuaternion({{" << Corrade::Utility::Debug::nospace

4
src/Magnum/Math/Frustum.h

@ -31,7 +31,7 @@
*/
#include <Corrade/configure.h>
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
#include <Corrade/Utility/Debug.h>
#endif
@ -274,7 +274,7 @@ template<class T> class Frustum {
Vector4<T> _data[6];
};
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{Frustum} */
template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Frustum<T>& value) {
debug << "Frustum({" << Corrade::Utility::Debug::nospace;

4
src/Magnum/Math/Half.h

@ -29,7 +29,7 @@
* @brief Class @ref Magnum::Math::Half, literal @link Magnum::Math::Literals::operator""_h() @endlink
*/
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
#include <Corrade/Utility/Utility.h>
#endif
@ -175,7 +175,7 @@ inline Half operator "" _h(long double value) { return Half(Float(value)); }
}
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/**
@debugoperator{Half}

4
src/Magnum/Math/Quaternion.h

@ -30,7 +30,7 @@
* @brief Class @ref Magnum::Math::Quaternion, function @ref Magnum::Math::dot(), @ref Magnum::Math::halfAngle(), @ref Magnum::Math::lerp(), @ref Magnum::Math::slerp()
*/
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
#include <Corrade/Utility/Debug.h>
#endif
#include <Corrade/Utility/DebugAssert.h>
@ -788,7 +788,7 @@ template<class T> inline Quaternion<T> operator/(T scalar, const Quaternion<T>&
return {scalar/quaternion.vector(), scalar/quaternion.scalar()};
}
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{Quaternion} */
template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Quaternion<T>& value) {
return debug << "Quaternion({" << Corrade::Utility::Debug::nospace

2
src/Magnum/Math/Range.h

@ -790,7 +790,7 @@ template<UnsignedInt dimensions, class T> inline bool intersects(const Range<dim
(Vector<dimensions, T>{a.min()} < b.max()).all();
}
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{Range} */
template<UnsignedInt dimensions, class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Range<dimensions, T>& value) {
debug << "Range({" << Corrade::Utility::Debug::nospace << Vector<dimensions, T>{value.min()}[0];

2
src/Magnum/Math/RectangularMatrix.h

@ -685,7 +685,7 @@ template<std::size_t size, std::size_t cols, class T> inline RectangularMatrix<c
return RectangularMatrix<1, size, T>(vector)*matrix;
}
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{RectangularMatrix} */
template<std::size_t cols, std::size_t rows, class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Magnum::Math::RectangularMatrix<cols, rows, T>& value) {
/** @todo might make sense to propagate the flags also, for hex value

4
src/Magnum/Math/Vector.h

@ -30,7 +30,7 @@
*/
#include <utility> /* std::pair */
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
#include <Corrade/Utility/Debug.h>
#endif
#include <Corrade/Utility/DebugAssert.h>
@ -1247,7 +1247,7 @@ operator/(const Vector<size, Integral>& a, const Vector<size, FloatingPoint>& b)
return copy /= b;
}
#ifndef CORRADE_NO_DEBUG
#ifndef CORRADE_SINGLES_NO_DEBUG
/** @debugoperator{Vector} */
template<std::size_t size, class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Vector<size, T>& value) {
/** @todo might make sense to propagate the flags also, for hex value

2
src/singles/base.h

@ -41,7 +41,7 @@
#pragma ACME disable CORRADE_NO_ASSERT
#pragma ACME disable CORRADE_NO_DEBUG_ASSERT
#pragma ACME enable CORRADE_STANDARD_ASSERT
#pragma ACME enable CORRADE_NO_DEBUG
#pragma ACME enable CORRADE_SINGLES_NO_DEBUG
#pragma ACME enable CORRADE_NO_TWEAKABLE
#pragma ACME disable CORRADE_GRACEFUL_ASSERT
#pragma ACME disable DOXYGEN_GENERATING_OUTPUT

Loading…
Cancel
Save