/[zanavi_public1]/navit/navit/vehicleprofile.c
ZANavi

Diff of /navit/navit/vehicleprofile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 29 Revision 30
81} 81}
82 82
83struct vehicleprofile * 83struct vehicleprofile *
84vehicleprofile_new(struct attr *parent, struct attr **attrs) 84vehicleprofile_new(struct attr *parent, struct attr **attrs)
85{ 85{
86 dbg(0,"EEnter\n");
87
86 struct vehicleprofile *this_; 88 struct vehicleprofile *this_;
87 struct attr **attr, *type_attr; 89 struct attr **attr, *type_attr;
88 if (! (type_attr=attr_search(attrs, NULL, attr_name))) { 90 if (! (type_attr=attr_search(attrs, NULL, attr_name))) {
89 return NULL; 91 return NULL;
90 } 92 }
96 this_->height=-1; 98 this_->height=-1;
97 this_->weight=-1; 99 this_->weight=-1;
98 this_->axle_weight=-1; 100 this_->axle_weight=-1;
99 this_->through_traffic_penalty=9000; 101 this_->through_traffic_penalty=9000;
100 for (attr=attrs;*attr; attr++) 102 for (attr=attrs;*attr; attr++)
103 {
101 vehicleprofile_set_attr_do(this_, *attr); 104 vehicleprofile_set_attr_do(this_, *attr);
105 }
106
107 dbg(0,"return\n");
102 return this_; 108 return this_;
103} 109}
104 110
105int 111int
106vehicleprofile_get_attr(struct vehicleprofile *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter) 112vehicleprofile_get_attr(struct vehicleprofile *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter)

Legend:
Removed from v.29  
changed lines
  Added in v.30

   
Visit the ZANavi Wiki