Fix broken sf::swap overloads

This commit is contained in:
Chris Thrasher 2023-05-12 22:25:06 -06:00
parent 98a59d62c7
commit b14d0b47e6
4 changed files with 4 additions and 4 deletions

View File

@ -637,7 +637,7 @@ private:
/// \param right Second instance to swap
///
////////////////////////////////////////////////////////////
void swap(Texture& left, Texture& right) noexcept;
SFML_GRAPHICS_API void swap(Texture& left, Texture& right) noexcept;
} // namespace sf

View File

@ -346,7 +346,7 @@ private:
/// \param right Second instance to swap
///
////////////////////////////////////////////////////////////
void swap(VertexBuffer& left, VertexBuffer& right) noexcept;
SFML_GRAPHICS_API void swap(VertexBuffer& left, VertexBuffer& right) noexcept;
} // namespace sf

View File

@ -196,7 +196,7 @@ TEST_CASE("[Graphics] sf::Texture" * doctest::skip(skipDisplayTests))
texture2.setSmooth(true);
texture2.setRepeated(false);
std::swap(texture1, texture2);
sf::swap(texture1, texture2);
CHECK_FALSE(texture1.isSrgb());
CHECK(texture1.isSmooth());
CHECK_FALSE(texture1.isRepeated());

View File

@ -149,7 +149,7 @@ TEST_CASE("[Graphics] sf::VertexBuffer" * doctest::skip(true))
sf::VertexBuffer vertexBuffer2(sf::PrimitiveType::TriangleStrip, sf::VertexBuffer::Stream);
CHECK(vertexBuffer2.create(60));
std::swap(vertexBuffer1, vertexBuffer2);
sf::swap(vertexBuffer1, vertexBuffer2);
CHECK(vertexBuffer1.getVertexCount() == 60);
CHECK(vertexBuffer1.getNativeHandle() != 0);