[kgraphviewer-devel] Re: optimize map loops

Gaël (aka Kleag) kleag at free.fr
Mon Nov 8 22:59:28 CET 2010


Le dimanche 7 novembre 2010 23:02:08, Milian Wolff a écrit :
> On Sunday 07 November 2010 22:11:51 Gaël (aka Kleag) wrote:
> 
> Isn't the map storing ID <-> Edge to begin with? If so, use this:
> 
> if(GraphEdge* edge = m_edgesMap.value(id, 0)) {
>   ...
> }
> 
> Same for some of the other changes I think.
You're right ! I just read http://doc.trolltech.com/4.7/qmap.html#value-2
You could have written RTFD :-)

I'll change that when possible.

Gaël

-- 
KsirK - a world domination strategy game 
http://techbase.kde.org/Projects/Games/Tactic_and_Strategy/KsirK

KGraphViewer - a GraphViz dot graphs viewer and editor based on a reusable 
part
http://extragear.kde.org/apps/kgraphviewer


More information about the kgraphviewer-devel mailing list