mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Apply compiler warnings to test utilities
This commit is contained in:
parent
9d401398e7
commit
829cf3b502
@ -10,6 +10,7 @@ add_library(sfml-test-main STATIC
|
||||
target_include_directories(sfml-test-main SYSTEM PUBLIC "${PROJECT_SOURCE_DIR}/extlibs/headers")
|
||||
target_include_directories(sfml-test-main PUBLIC TestUtilities)
|
||||
target_link_libraries(sfml-test-main PUBLIC SFML::System)
|
||||
set_target_warnings(sfml-test-main)
|
||||
|
||||
SET(SYSTEM_SRC
|
||||
System/Angle.cpp
|
||||
|
@ -37,12 +37,12 @@ namespace sf
|
||||
|
||||
bool operator==(const sf::Vector2f& lhs, const ApproxVec& rhs)
|
||||
{
|
||||
return (lhs - rhs.vector).length() == doctest::Approx(0.0);
|
||||
return static_cast<double>((lhs - rhs.vector).length()) == doctest::Approx(0.0);
|
||||
}
|
||||
|
||||
bool operator==(const sf::Angle& lhs, const ApproxDeg& rhs)
|
||||
{
|
||||
return lhs.asDegrees() == doctest::Approx(rhs.degrees);
|
||||
return static_cast<double>(lhs.asDegrees()) == doctest::Approx(static_cast<double>(rhs.degrees));
|
||||
}
|
||||
|
||||
std::ostream& operator <<(std::ostream& os, const ApproxVec& approx)
|
||||
|
Loading…
Reference in New Issue
Block a user