X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdesigner%2Fmanipulator.cpp;h=c103314564a69daead55d65c255382681819b3e1;hb=621c5c938d70ba0d155e0eda91a708db0a52c0dc;hp=01633fa908246dacdb95424d129e209d7cd63560;hpb=7f81613ba3efdff6e05246738f739e1f914e1151;p=r2c2.git diff --git a/source/designer/manipulator.cpp b/source/designer/manipulator.cpp index 01633fa..c103314 100644 --- a/source/designer/manipulator.cpp +++ b/source/designer/manipulator.cpp @@ -1,13 +1,6 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #include #include -#include +#include #include "libr2c2/tracktype.h" #include "designer.h" #include "manipulator.h" @@ -653,11 +646,7 @@ vector Manipulator::create_straight(const R2C2::Vector &start, float di float s = sin(dir); for(vector::iterator i=lengths.begin(); i!=lengths.end(); ++i) { - map::iterator j = types_by_length.find(*i); - if(j==types_by_length.end()) - throw LogicError("Internal error"); - - Track *track = new Track(designer.get_layout(), *j->second); + Track *track = new Track(designer.get_layout(), *get_item(types_by_length, *i)); track->set_position(pos); track->set_rotation(dir);