diff options
Diffstat (limited to 'gtk2_ardour/editing.h')
-rw-r--r-- | gtk2_ardour/editing.h | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/gtk2_ardour/editing.h b/gtk2_ardour/editing.h index b25b935ee0..05aab74750 100644 --- a/gtk2_ardour/editing.h +++ b/gtk2_ardour/editing.h @@ -24,11 +24,7 @@ enum SnapType { #include "editing_syms.h" }; -#undef SNAPTYPE -#define SNAPTYPE(s) #s, -static const char *snaptypestrs[] = { - #include "editing_syms.h" -}; +extern const char *snaptypestrs[]; inline const char* enum2str(SnapType m) {return snaptypestrs[m];} SnapType str2snaptype(const std::string &); @@ -42,11 +38,7 @@ enum SnapMode { #include "editing_syms.h" }; -#undef SNAPMODE -#define SNAPMODE(s) #s, -static const char *snapmodestrs[] = { - #include "editing_syms.h" -}; +extern const char *snapmodestrs[]; inline const char* enum2str(SnapMode m) {return snapmodestrs[m];} SnapMode str2snapmode(const std::string &); @@ -60,11 +52,7 @@ enum RegionListSortType { #include "editing_syms.h" }; -#undef REGIONLISTSORTTYPE -#define REGIONLISTSORTTYPE(s) #s, -static const char *regionlistsorttypestrs[] = { - #include "editing_syms.h" -}; +extern const char *regionlistsorttypestrs[]; inline const char* enum2str(RegionListSortType m) {return regionlistsorttypestrs[m];} RegionListSortType str2regionlistsorttype(const std::string &); @@ -78,11 +66,7 @@ enum MouseMode { #include "editing_syms.h" }; -#undef MOUSEMODE -#define MOUSEMODE(s) #s, -static const char *mousemodestrs[] = { - #include "editing_syms.h" -}; +extern const char *mousemodestrs[]; inline const char* enum2str(MouseMode m) {return mousemodestrs[m];} MouseMode str2mousemode(const std::string &); @@ -96,11 +80,7 @@ enum ZoomFocus { #include "editing_syms.h" }; -#undef ZOOMFOCUS -#define ZOOMFOCUS(s) #s, -static const char *zoomfocusstrs[] = { - #include "editing_syms.h" -}; +extern const char *zoomfocusstrs[]; inline const char* enum2str(ZoomFocus m) {return zoomfocusstrs[m];} ZoomFocus str2zoomfocus(const std::string &); @@ -114,11 +94,7 @@ enum DisplayControl { #include "editing_syms.h" }; -#undef DISPLAYCONTROL -#define DISPLAYCONTROL(s) #s, -static const char *displaycontrolstrs[] = { - #include "editing_syms.h" -}; +extern const char *displaycontrolstrs[]; inline const char* enum2str(DisplayControl m) {return displaycontrolstrs[m];} DisplayControl str2displaycontrol (const std::string &); @@ -132,11 +108,7 @@ enum ImportMode { #include "editing_syms.h" }; -#undef IMPORTMODE -#define IMPORTMODE(s) #s, -static const char *importmodestrs[] = { - #include "editing_syms.h" -}; +extern const char *importmodestrs[]; inline const char* enum2str(ImportMode m) {return importmodestrs[m];} ImportMode str2importmode (const std::string &); |