From 8216a980535a86e006855409c5620530061724de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 19 Feb 2013 04:52:53 +0100 Subject: Fix unintended rename of many various *klist* --- kig/objects/polygon_imp.cc | 30 +++++++++++++++--------------- kig/scripting/python_scripter.cc | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'kig') diff --git a/kig/objects/polygon_imp.cc b/kig/objects/polygon_imp.cc index dd3ffa44..43ee16f9 100644 --- a/kig/objects/polygon_imp.cc +++ b/kig/objects/polygon_imp.cc @@ -498,34 +498,34 @@ std::vector computeConvexHull( const std::vector& points */ if ( points.size() < 3 ) return points; - std::vector wortdelist = points; + std::vector worklist = points; std::vector result; - double ymin = wortdelist[0].y; + double ymin = worklist[0].y; uint imin = 0; - for ( uint i = 1; i < wortdelist.size(); ++i ) + for ( uint i = 1; i < worklist.size(); ++i ) { - if ( wortdelist[i].y < ymin ) + if ( worklist[i].y < ymin ) { - ymin = wortdelist[i].y; + ymin = worklist[i].y; imin = i; } } - // wortdelist[imin] is definitely on the convex hull, let's start from there - result.push_back( wortdelist[imin] ); - Coordinate startpoint = wortdelist[imin]; - Coordinate apoint = wortdelist[imin]; + // worklist[imin] is definitely on the convex hull, let's start from there + result.push_back( worklist[imin] ); + Coordinate startpoint = worklist[imin]; + Coordinate apoint = worklist[imin]; double aangle = 0.0; - while ( ! wortdelist.empty() ) + while ( ! worklist.empty() ) { int besti = -1; double anglemin = 10000.0; - for ( uint i = 0; i < wortdelist.size(); ++i ) + for ( uint i = 0; i < worklist.size(); ++i ) { - if ( wortdelist[i] == apoint ) continue; - Coordinate v = wortdelist[i] - apoint; + if ( worklist[i] == apoint ) continue; + Coordinate v = worklist[i] - apoint; double angle = std::atan2( v.y, v.x ); while ( angle < aangle ) angle += 2*M_PI; if ( angle < anglemin ) @@ -536,14 +536,14 @@ std::vector computeConvexHull( const std::vector& points } if ( besti < 0 ) return result; // this happens, e.g. if all points coincide - apoint = wortdelist[besti]; + apoint = worklist[besti]; aangle = anglemin; if ( apoint == startpoint ) { return result; } result.push_back( apoint ); - wortdelist.erase( wortdelist.begin() + besti, wortdelist.begin() + besti + 1 ); + worklist.erase( worklist.begin() + besti, worklist.begin() + besti + 1 ); } assert( false ); return result; diff --git a/kig/scripting/python_scripter.cc b/kig/scripting/python_scripter.cc index 81f377ac..7e833d5c 100644 --- a/kig/scripting/python_scripter.cc +++ b/kig/scripting/python_scripter.cc @@ -539,12 +539,12 @@ void PythonScripter::saveErrors() object printexcfunc = d->mainnamespace[ "traceback" ].attr( "format_exception" ); - list tracebactdelist = extract( printexcfunc( exctype, excvalue, exctraceback ) )(); + list tracebacklist = extract( printexcfunc( exctype, excvalue, exctraceback ) )(); str tracebackstr( "" ); while ( true ) { try { - str s = extract( tracebactdelist.pop() ); + str s = extract( tracebacklist.pop() ); tracebackstr += s; } catch( ... ) -- cgit v1.2.1