rely on exceptions when parsing Beats from AudioClock, not strspn(3)

This commit is contained in:
Paul Davis 2020-12-28 13:49:12 -07:00
parent e590598dcf
commit b03cfa2420

View File

@ -633,14 +633,11 @@ MidiListEditor::edited (const std::string& path, const std::string& text)
case 5: // length
#warning NUTEMPO should likely use just Beats::operator>> and exceptions here
if (strspn (text.c_str(), "0123456789:") == text.length()) {
try {
stringstream ss (text);
ss >> bval;
} else {
} catch (...) {
/* assume its text from the combo. look for the map
* entry for the actual note ticks