diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-09 03:36:00 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-09 03:36:00 +0000 |
commit | 14543eb1374dc51834385d2f3886f1e6068223c5 (patch) | |
tree | 5194d0a983b77d79f5310f1216129e84c64f6a42 /libs/ardour/ardour | |
parent | 138b12b1dd5b7e6175b3349b8ed7fa8b16721809 (diff) |
strip X specific from keyboard.cc; fix up many buttons to avoid prelight (mostly) and make transport buttons bindable (state not saved yet); use const char* not string in route order keys to avoid pointless mallocs during route sorting
git-svn-id: svn://localhost/ardour2/trunk@1437 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/route.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 869d7eb239..d4f94ed744 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -78,8 +78,8 @@ class Route : public IO std::string comment() { return _comment; } void set_comment (std::string str, void *src); - long order_key(std::string name) const; - void set_order_key (std::string name, long n); + long order_key (const char* name) const; + void set_order_key (const char* name, long n); bool hidden() const { return _flags & Hidden; } bool master() const { return _flags & MasterOut; } @@ -321,7 +321,16 @@ class Route : public IO void init (); static uint32_t order_key_cnt; - typedef std::map<std::string,long> OrderKeys; + + struct ltstr + { + bool operator()(const char* s1, const char* s2) const + { + return strcmp(s1, s2) < 0; + } + }; + + typedef std::map<const char*,long,ltstr> OrderKeys; OrderKeys order_keys; void input_change_handler (IOChange, void *src); |