diff options
Diffstat (limited to 'navit/roadprofile.c')
-rw-r--r-- | navit/roadprofile.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/navit/roadprofile.c b/navit/roadprofile.c index c23c88238..81033d46d 100644 --- a/navit/roadprofile.c +++ b/navit/roadprofile.c @@ -23,8 +23,7 @@ #include "xmlconfig.h" #include "roadprofile.h" -static void -roadprofile_set_attr_do(struct roadprofile *this, struct attr *attr) { +static void roadprofile_set_attr_do(struct roadprofile *this, struct attr *attr) { switch (attr->type) { case attr_speed: this->speed=attr->u.num; @@ -54,26 +53,22 @@ roadprofile_new(struct attr *parent, struct attr **attrs) { return this_; } -int -roadprofile_get_attr(struct roadprofile *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter) { +int roadprofile_get_attr(struct roadprofile *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter) { return attr_generic_get_attr(this_->attrs, NULL, type, attr, iter); } -int -roadprofile_set_attr(struct roadprofile *this_, struct attr *attr) { +int roadprofile_set_attr(struct roadprofile *this_, struct attr *attr) { roadprofile_set_attr_do(this_, attr); this_->attrs=attr_generic_set_attr(this_->attrs, attr); return 1; } -int -roadprofile_add_attr(struct roadprofile *this_, struct attr *attr) { +int roadprofile_add_attr(struct roadprofile *this_, struct attr *attr) { this_->attrs=attr_generic_add_attr(this_->attrs, attr); return 1; } -int -roadprofile_remove_attr(struct roadprofile *this_, struct attr *attr) { +int roadprofile_remove_attr(struct roadprofile *this_, struct attr *attr) { this_->attrs=attr_generic_remove_attr(this_->attrs, attr); return 1; } @@ -83,13 +78,11 @@ roadprofile_attr_iter_new(void) { return (struct attr_iter *)g_new0(void *,1); } -void -roadprofile_attr_iter_destroy(struct attr_iter *iter) { +void roadprofile_attr_iter_destroy(struct attr_iter *iter) { g_free(iter); } -static struct roadprofile * -roadprofile_dup(struct roadprofile *this_) { +static struct roadprofile *roadprofile_dup(struct roadprofile *this_) { struct roadprofile *ret=g_new(struct roadprofile, 1); *ret=*this_; ret->refcount=1; @@ -97,8 +90,7 @@ roadprofile_dup(struct roadprofile *this_) { return ret; } -static void -roadprofile_destroy(struct roadprofile *this_) { +static void roadprofile_destroy(struct roadprofile *this_) { attr_list_free(this_->attrs); g_free(this_); } |