From 53147b5e6e0cfff748d49d4532b4c46f576fff88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 1 Dec 2017 22:24:04 +0100 Subject: [PATCH] Code cleanup --- src/data/path.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/data/path.cpp b/src/data/path.cpp index d4bcfb82..d4392cde 100644 --- a/src/data/path.cpp +++ b/src/data/path.cpp @@ -2,11 +2,12 @@ RectC Path::boundingRect() const { - if (size() < 2) - return RectC(); + RectC ret; - RectC ret(first().coordinates(), first().coordinates()); - for (int i = 1; i < size(); i++) + if (size() < 2) + return ret; + + for (int i = 0; i < size(); i++) ret.unite(at(i).coordinates()); return ret;