From 851c1145353297fd28fe68533e7699682b518970 Mon Sep 17 00:00:00 2001 From: martin-s Date: Tue, 5 Jun 2012 13:58:38 +0000 Subject: [PATCH] Fix:Core:Moved struct range outside of struct attr for better c++ compatibility git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@5128 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/attr.h | 8 +++++--- navit/navit/gui/qml/gui_qml.cpp | 6 ------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/navit/navit/attr.h b/navit/navit/attr.h index e82b08f..379fe57 100644 --- a/navit/navit/attr.h +++ b/navit/navit/attr.h @@ -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; diff --git a/navit/navit/gui/qml/gui_qml.cpp b/navit/navit/gui/qml/gui_qml.cpp index 344f0cc..a020538 100644 --- a/navit/navit/gui/qml/gui_qml.cpp +++ b/navit/navit/gui/qml/gui_qml.cpp @@ -32,12 +32,6 @@ #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 { -- 2.7.4