From 0c8c35fa0c8a32f239b58292dd5f0aa476021730 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Thu, 3 Feb 2022 17:22:45 -0700 Subject: [PATCH] Fix findIntersection documentation --- include/SFML/Graphics/Rect.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 /// ////////////////////////////////////////////////////////////