pub fn compress(&mut self, map: &Map) {
        for r in &self.changed_roads {
            self.commands.push(EditCmd::ChangeRoad {
                r: *r,
                old: EditRoad::get_orig_from_osm(map.get_r(*r), &map.config),
                new: map.get_r_edit(*r),
            });
        }
        for (i, old) in &self.original_intersections {
            self.commands.push(EditCmd::ChangeIntersection {
                i: *i,
                old: old.clone(),
                new: map.get_i_edit(*i),
            });
        }
        for r in &self.changed_routes {
            let r = map.get_br(*r);
            self.commands.push(EditCmd::ChangeRouteSchedule {
                id: r.id,
                new: r.spawn_times.clone(),
                old: r.orig_spawn_times.clone(),
            });
        }
    }
/// Assumes update_derived has been called.
Assumes update_derived has been called.
Assumes update_derived has been called .
pub fn compress(&mut self, map: &Map) {
        for r in &self.changed_roads {
            self.commands.push(EditCmd::ChangeRoad {
                r: *r,
                old: EditRoad::get_orig_from_osm(map.get_r(*r), &map.config),
                new: map.get_r_edit(*r),
            });
        }
        for (i, old) in &self.original_intersections {
            self.commands.push(EditCmd::ChangeIntersection {
                i: *i,
                old: old.clone(),
                new: map.get_i_edit(*i),
            });
        }
        for r in &self.changed_routes {
            let r = map.get_br(*r);
            self.commands.push(EditCmd::ChangeRouteSchedule {
                id: r.id,
                new: r.spawn_times.clone(),
                old: r.orig_spawn_times.clone(),
            });
        }
    }
pub fn compress ( & mut self , map : & Map ) { for r in & self . changed_roads { self . commands . push ( EditCmd :: ChangeRoad { r : * r , old : EditRoad :: get_orig_from_osm ( map . get_r ( * r ) , & map . config ) , new : map . get_r_edit ( * r ) , } ) ; } for ( i , old ) in & self . original_intersections { self . commands . push ( EditCmd :: ChangeIntersection { i : * i , old : old . clone ( ) , new : map . get_i_edit ( * i ) , } ) ; } for r in & self . changed_routes { let r = map . get_br ( * r ) ; self . commands . push ( EditCmd :: ChangeRouteSchedule { id : r . id , new : r . spawn_times . clone ( ) , old : r . orig_spawn_times . clone ( ) , } ) ; } }
Assumes update_derived has been called.
Assumes update_derived has been called .
&mut self
map
&Map