Fix:Core:Moved struct range outside of struct attr for better c++ compatibility
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 5 Jun 2012 13:58:38 +0000 (13:58 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 5 Jun 2012 13:58:38 +0000 (13:58 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@5128 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/attr.h
navit/navit/gui/qml/gui_qml.cpp

index e82b08f..379fe57 100644 (file)
@@ -106,6 +106,10 @@ enum attr_position_valid {
 #define ATTR_DEF_ITEMS(x,...) (&(struct attr){attr_##x,{(char *)((enum item_type[]){__VA_ARGS__ , type_none})}})
 #define ATTR_LIST(...) (struct attr *[]) { __VA_ARGS__, NULL}
 
+struct range {
+       short min, max;
+};
+
 struct attr {
        enum attr_type type;
        union {
@@ -154,9 +158,7 @@ struct attr {
                struct bookmarks *bookmarks;
                struct config *config;
                struct osd *osd;
-               struct range {
-                       short min, max;
-               } range;
+               struct range range;
                int *dash;
                enum item_type *item_types;
                enum attr_type *attr_types;
index 344f0cc..a020538 100644 (file)
 #include "command.h"
 #include "keys.h"
 
-//WORKAOUND for the c/c++ compatibility issues.
-//range is defined inside of struct attr so it is invisible in c++
-struct range {
-       short min, max;
-} range;
-
 #include "layout.h"
 
 struct gui_priv {