rely on exceptions when parsing Beats from AudioClock, not strspn(3)
This commit is contained in:
parent
e590598dcf
commit
b03cfa2420
@ -633,14 +633,11 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
|
|||||||
case 5: // length
|
case 5: // length
|
||||||
|
|
||||||
|
|
||||||
#warning NUTEMPO should likely use just Beats::operator>> and exceptions here
|
try {
|
||||||
|
|
||||||
if (strspn (text.c_str(), "0123456789:") == text.length()) {
|
|
||||||
|
|
||||||
stringstream ss (text);
|
stringstream ss (text);
|
||||||
ss >> bval;
|
ss >> bval;
|
||||||
|
|
||||||
} else {
|
} catch (...) {
|
||||||
|
|
||||||
/* assume its text from the combo. look for the map
|
/* assume its text from the combo. look for the map
|
||||||
* entry for the actual note ticks
|
* entry for the actual note ticks
|
||||||
|
Loading…
Reference in New Issue
Block a user