Apply compiler warnings to test utilities

This commit is contained in:
Chris Thrasher 2022-05-04 11:11:07 -06:00 committed by Lukas Dürrenberger
parent 9d401398e7
commit 829cf3b502
2 changed files with 3 additions and 2 deletions

View File

@ -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 SYSTEM PUBLIC "${PROJECT_SOURCE_DIR}/extlibs/headers")
target_include_directories(sfml-test-main PUBLIC TestUtilities) target_include_directories(sfml-test-main PUBLIC TestUtilities)
target_link_libraries(sfml-test-main PUBLIC SFML::System) target_link_libraries(sfml-test-main PUBLIC SFML::System)
set_target_warnings(sfml-test-main)
SET(SYSTEM_SRC SET(SYSTEM_SRC
System/Angle.cpp System/Angle.cpp

View File

@ -37,12 +37,12 @@ namespace sf
bool operator==(const sf::Vector2f& lhs, const ApproxVec& rhs) 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) 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) std::ostream& operator <<(std::ostream& os, const ApproxVec& approx)