Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Oct 2013 10:13:32 +0400
From:      Boris Samorodov <bsam@passap.ru>
To:        Tomasz Sowa <t.sowa@ttmath.org>
Cc:        Koop Mast <kwm@FreeBSD.org>, FreeBSD Ports ML <freebsd-ports@freebsd.org>
Subject:   Re: graphics/inkscape commit r330754
Message-ID:  <5262230C.3060400@passap.ru>
In-Reply-To: <52617B3C.9070608@ttmath.org>
References:  <52617B3C.9070608@ttmath.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5262230C.3060400>