13
0

AudioClock: use str parameter instead of accessing widget directly

This commit is contained in:
Mads Kiilerich 2022-11-04 16:34:58 +01:00 committed by Robin Gareus
parent 8fe7970c7c
commit f129cf4485
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -2022,13 +2022,13 @@ AudioClock::bbt_validate_edit (string & str)
}
bool
AudioClock::timecode_validate_edit (const string&)
AudioClock::timecode_validate_edit (const string& str)
{
Timecode::Time TC;
int hours;
char ignored[2];
if (sscanf (_layout->get_text().c_str(), "%[- _]%" PRId32 ":%" PRId32 ":%" PRId32 "%[:;]%" PRId32,
if (sscanf (str.c_str(), "%[- _]%" PRId32 ":%" PRId32 ":%" PRId32 "%[:;]%" PRId32,
ignored, &hours, &TC.minutes, &TC.seconds, ignored, &TC.frames) != 6) {
return false;
}