diff OrthancStone/Sources/Scene2D/Scene2D.cpp @ 1610:b7630b1a0253

ISceneLayer::GetBoundingBox() returns void
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 29 Oct 2020 17:13:13 +0100
parents 8563ea5d8ae4
children 9ac2a65d4172
line wrap: on
line diff
--- a/OrthancStone/Sources/Scene2D/Scene2D.cpp	Thu Oct 29 17:01:29 2020 +0100
+++ b/OrthancStone/Sources/Scene2D/Scene2D.cpp	Thu Oct 29 17:13:13 2020 +0100
@@ -223,9 +223,9 @@
     canvasToScene_ = inverse;
   }
 
-  void Scene2D::GetBoundingBox(Extent2D &target) const
+  void Scene2D::GetBoundingBox(Extent2D& target) const
   {
-    target.Reset();
+    target.Clear();
 
     for (Content::const_iterator it = content_.begin();
          it != content_.end(); ++it)
@@ -233,10 +233,8 @@
       assert(it->second != NULL);
 
       Extent2D tmp;
-      if (it->second->GetLayer().GetBoundingBox(tmp))
-      {
-        target.Union(tmp);
-      }
+      it->second->GetLayer().GetBoundingBox(tmp);
+      target.Union(tmp);
     }
   }