Fix:Core:Correct handling of attribute query
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sat, 6 Feb 2010 23:08:45 +0000 (23:08 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sat, 6 Feb 2010 23:08:45 +0000 (23:08 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@2951 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/attr.h
navit/navit/navit.c

index 5c2ec81..5391018 100644 (file)
@@ -83,6 +83,7 @@ enum attr_position_valid {
 #define ATTR_IS_OBJECT(x) ((x) >= attr_type_object_begin && (x) <= attr_type_object_end)
 #define ATTR_IS_COORD_GEO(x) ((x) >= attr_type_coord_geo_begin && (x) <= attr_type_coord_geo_end)
 #define ATTR_IS_NUMERIC(x) (ATTR_IS_INT(x) || ATTR_IS_DOUBLE(x))
+#define ATTR_IS_COLOR(x) ((x) >= attr_type_color_begin && (x) <= attr_type_color_end)
 
 struct attr {
        enum attr_type type;
index c35df53..38e0b2e 100644 (file)
@@ -1905,7 +1905,8 @@ navit_get_attr(struct navit *this_, enum attr_type type, struct attr *attr, stru
                break;
        case attr_mapset:
                attr->u.mapset=this_->mapsets->data;
-               return (attr->u.mapset != NULL);
+               ret=(attr->u.mapset != NULL);
+               break;
        case attr_navigation:
                attr->u.navigation=this_->navigation;
                break;