X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=inline;f=source%2Fdesigner%2Fmanipulator.cpp;h=c103314564a69daead55d65c255382681819b3e1;hb=4236c30c0a7a48854e9634e9ad7d8d6e0fd243a3;hp=5f0354088f4641eed72f8b0edc751c60ffadce53;hpb=ce29d0ccf89840c9581314301de0ea2b5b261c43;p=r2c2.git diff --git a/source/designer/manipulator.cpp b/source/designer/manipulator.cpp index 5f03540..c103314 100644 --- a/source/designer/manipulator.cpp +++ b/source/designer/manipulator.cpp @@ -646,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);