diff --git a/include/SFML/Graphics/Rect.hpp b/include/SFML/Graphics/Rect.hpp index 43b72d91..30703bcd 100644 --- a/include/SFML/Graphics/Rect.hpp +++ b/include/SFML/Graphics/Rect.hpp @@ -220,9 +220,9 @@ using FloatRect = Rect; /// bool b2 = r2.contains(3, 1); // false /// /// // Test the intersection between r1 and r2 -/// sf::IntRect result; -/// bool b3 = r1.findIntersection(r2, result); // true -/// // result == (4, 2, 16, 3) +/// std::optional result = r1.findIntersection(r2); +/// // result.has_value() == true +/// // result.value() == (4, 2, 16, 3) /// \endcode /// ////////////////////////////////////////////////////////////