Date: Sat, 19 Oct 2013 10:00:20 +0200 From: Koop Mast <kwm@rainbow-runner.nl> To: Boris Samorodov <bsam@passap.ru>, Tomasz Sowa <t.sowa@ttmath.org> Cc: FreeBSD Ports ML <freebsd-ports@freebsd.org> Subject: Re: graphics/inkscape commit r330754 Message-ID: <52623C14.2090401@rainbow-runner.nl> In-Reply-To: <5262230C.3060400@passap.ru> References: <52617B3C.9070608@ttmath.org> <5262230C.3060400@passap.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On 19-10-2013 8:13, Boris Samorodov wrote: > 18.10.2013 22:17, Tomasz Sowa пишет: >> Hi >> >> Thank you for the update for compiling with clang. I have got a question >> about one function: >> void sp_item_rm_unsatisfied_cns(SPItem &item) >> from src/sp-item-rm-unsatisfied-cns.cpp >> >> before patching it is: >> void sp_item_rm_unsatisfied_cns(SPItem &item) >> { >> if (item.constraints.empty()) { >> return; >> } >> std::vector<Inkscape::SnapCandidatePoint> snappoints; >> sp_item_snappoints(&item, snappoints, NULL); >> for (unsigned i = item.constraints.size(); i--;) { >> g_assert( i < item.constraints.size() ); >> SPGuideConstraint const &cn = item.constraints[i]; >> int const snappoint_ix = cn.snappoint_ix; >> g_assert( snappoint_ix < int(snappoints.size()) ); >> if (!approx_equal( sp_guide_distance_from_pt(cn.g, >> snappoints[snappoint_ix].getPoint()), 0) ) { >> remove_last(cn.g->attached_items, SPGuideAttachment(&item, >> cn.snappoint_ix)); >> g_assert( i < item.constraints.size() ); >> vector<SPGuideConstraint>::iterator const >> ei(&item.constraints[i]); >> item.constraints.erase(ei); >> } >> } >> } >> >> but after patching the last erase() is changed to: >> item.constraints.erase(item.constraints.begin() + 1); >> >> and this is not the same, it propably should be: >> item.constraints.erase(item.constraints.begin() + i); > Yep, that seems to be a typo. > Fix thanks for the report, it took me a while to see that the but actually was :) -Koop
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52623C14.2090401>