Remove unnecessary sf:: usage

This commit is contained in:
Chris Thrasher 2022-07-04 23:46:34 -06:00 committed by Vittorio Romeo
parent 28a4a88832
commit acabaadc0b
6 changed files with 14 additions and 14 deletions

View File

@ -7,7 +7,7 @@
namespace sf namespace sf
{ {
std::ostream& operator<<(std::ostream& os, const sf::BlendMode& blendMode) std::ostream& operator<<(std::ostream& os, const BlendMode& blendMode)
{ {
os << "( " << blendMode.colorSrcFactor << ", " << blendMode.colorDstFactor << ", " << blendMode.colorEquation << ", " os << "( " << blendMode.colorSrcFactor << ", " << blendMode.colorDstFactor << ", " << blendMode.colorEquation << ", "
<< blendMode.alphaSrcFactor << ", " << blendMode.alphaDstFactor << ", " << blendMode.alphaEquation << " )"; << blendMode.alphaSrcFactor << ", " << blendMode.alphaDstFactor << ", " << blendMode.alphaEquation << " )";
@ -15,7 +15,7 @@ std::ostream& operator<<(std::ostream& os, const sf::BlendMode& blendMode)
return os; return os;
} }
std::ostream& operator<<(std::ostream& os, const sf::Color& color) std::ostream& operator<<(std::ostream& os, const Color& color)
{ {
os << "0x" << std::hex << color.toInteger() << std::dec << " (r=" << static_cast<int>(color.r) os << "0x" << std::hex << color.toInteger() << std::dec << " (r=" << static_cast<int>(color.r)
<< ", g=" << static_cast<int>(color.g) << ", b=" << static_cast<int>(color.b) << ", g=" << static_cast<int>(color.g) << ", b=" << static_cast<int>(color.b)
@ -24,7 +24,7 @@ std::ostream& operator<<(std::ostream& os, const sf::Color& color)
return os; return os;
} }
std::ostream& operator<<(std::ostream& os, const sf::Transform& transform) std::ostream& operator<<(std::ostream& os, const Transform& transform)
{ {
const auto& matrix = transform.getMatrix(); const auto& matrix = transform.getMatrix();
os << matrix[0] << ", " << matrix[4] << ", " << matrix[12] << ", "; os << matrix[0] << ", " << matrix[4] << ", " << matrix[12] << ", ";

View File

@ -23,7 +23,7 @@ std::ostream& operator<<(std::ostream& os, const Color& color);
std::ostream& operator<<(std::ostream& os, const Transform& transform); std::ostream& operator<<(std::ostream& os, const Transform& transform);
template <typename T> template <typename T>
std::ostream& operator<<(std::ostream& os, const sf::Rect<T>& rect) std::ostream& operator<<(std::ostream& os, const Rect<T>& rect)
{ {
const auto flags = os.flags(); const auto flags = os.flags();
os << std::fixed << std::setprecision(std::numeric_limits<T>::max_digits10); os << std::fixed << std::setprecision(std::numeric_limits<T>::max_digits10);

View File

@ -8,20 +8,20 @@
namespace sf namespace sf
{ {
std::ostream& operator<<(std::ostream& os, const sf::Angle& angle) std::ostream& operator<<(std::ostream& os, const Angle& angle)
{ {
os << std::fixed << std::setprecision(std::numeric_limits<float>::max_digits10); os << std::fixed << std::setprecision(std::numeric_limits<float>::max_digits10);
os << angle.asDegrees() << " deg"; os << angle.asDegrees() << " deg";
return os; return os;
} }
std::ostream& operator<<(std::ostream& os, const sf::String& string) std::ostream& operator<<(std::ostream& os, const String& string)
{ {
os << string.toAnsiString(); os << string.toAnsiString();
return os; return os;
} }
std::ostream& operator<<(std::ostream& os, sf::Time time) std::ostream& operator<<(std::ostream& os, Time time)
{ {
os << time.asMicroseconds() << "us"; os << time.asMicroseconds() << "us";
return os; return os;

View File

@ -20,12 +20,12 @@ class Angle;
class String; class String;
class Time; class Time;
std::ostream& operator<<(std::ostream& os, const sf::Angle& angle); std::ostream& operator<<(std::ostream& os, const Angle& angle);
std::ostream& operator<<(std::ostream& os, const sf::String& string); std::ostream& operator<<(std::ostream& os, const String& string);
std::ostream& operator<<(std::ostream& os, sf::Time time); std::ostream& operator<<(std::ostream& os, Time time);
template <typename T> template <typename T>
std::ostream& operator<<(std::ostream& os, const sf::Vector2<T>& vector) std::ostream& operator<<(std::ostream& os, const Vector2<T>& vector)
{ {
os << std::fixed << std::setprecision(std::numeric_limits<T>::max_digits10); os << std::fixed << std::setprecision(std::numeric_limits<T>::max_digits10);
os << "(" << vector.x << ", " << vector.y << ")"; os << "(" << vector.x << ", " << vector.y << ")";
@ -33,7 +33,7 @@ std::ostream& operator<<(std::ostream& os, const sf::Vector2<T>& vector)
} }
template <typename T> template <typename T>
std::ostream& operator<<(std::ostream& os, const sf::Vector3<T>& vector) std::ostream& operator<<(std::ostream& os, const Vector3<T>& vector)
{ {
os << "(" << vector.x << ", " << vector.y << ", " << vector.z << ")"; os << "(" << vector.x << ", " << vector.y << ", " << vector.z << ")";
return os; return os;

View File

@ -5,7 +5,7 @@
namespace sf namespace sf
{ {
std::ostream& operator<<(std::ostream& os, const sf::VideoMode& videoMode) std::ostream& operator<<(std::ostream& os, const VideoMode& videoMode)
{ {
os << videoMode.size.x << "x" << videoMode.size.y << "x" << videoMode.bitsPerPixel; os << videoMode.size.x << "x" << videoMode.size.y << "x" << videoMode.bitsPerPixel;
return os; return os;

View File

@ -13,7 +13,7 @@ namespace sf
{ {
class VideoMode; class VideoMode;
std::ostream& operator<<(std::ostream& os, const sf::VideoMode& videoMode); std::ostream& operator<<(std::ostream& os, const VideoMode& videoMode);
} // namespace sf } // namespace sf
#endif // SFML_TESTUTILITIES_WINDOW_HPP #endif // SFML_TESTUTILITIES_WINDOW_HPP