summaryrefslogtreecommitdiff
path: root/libs/pbd/enumwriter.cc
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2014-07-01 16:43:00 -0500
committerBen Loftis <ben@harrisonconsoles.com>2014-07-01 16:43:00 -0500
commit190542c1d0bc81b498229453e62e85b42bdf8246 (patch)
tree2383a7c8a395587b6659dc1097789ba3d181be33 /libs/pbd/enumwriter.cc
parent960e5a3c7cb2ed1f0f2a8be0c417c6ee61e78f27 (diff)
splice mode is undefined, undocumented, and buggy. ripple does most of what we want. remove splice for now. leave code because it may be revived later
Diffstat (limited to 'libs/pbd/enumwriter.cc')
-rw-r--r--libs/pbd/enumwriter.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/libs/pbd/enumwriter.cc b/libs/pbd/enumwriter.cc
index 6d911b2dea..f67d305080 100644
--- a/libs/pbd/enumwriter.cc
+++ b/libs/pbd/enumwriter.cc
@@ -279,6 +279,23 @@ EnumWriter::read_distinct (EnumRegistration& er, string str)
vector<int>::iterator i;
vector<string>::iterator s;
+ /* first, check to see if there a hack for the name we're looking up */
+
+ map<string,string>::iterator x;
+
+ if ((x = hack_table.find (str)) != hack_table.end()) {
+
+ cerr << "found hack for " << str << " = " << x->second << endl;
+
+ str = x->second;
+
+ for (i = er.values.begin(), s = er.names.begin(); i != er.values.end(); ++i, ++s) {
+ if (str == (*s) || nocase_cmp (str, *s) == 0) {
+ return (*i);
+ }
+ }
+ }
+
/* catch old-style hex numerics */
if (str.length() > 2 && str[0] == '0' && str[1] == 'x') {
@@ -299,23 +316,6 @@ EnumWriter::read_distinct (EnumRegistration& er, string str)
}
}
- /* failed to find it as-is. check to see if there a hack for the name we're looking up */
-
- map<string,string>::iterator x;
-
- if ((x = hack_table.find (str)) != hack_table.end()) {
-
- cerr << "found hack for " << str << " = " << x->second << endl;
-
- str = x->second;
-
- for (i = er.values.begin(), s = er.names.begin(); i != er.values.end(); ++i, ++s) {
- if (str == (*s) || nocase_cmp (str, *s) == 0) {
- return (*i);
- }
- }
- }
-
throw unknown_enumeration(str);
}