forked from mia/Aegisub
srt: Factor out a goto statement
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
parent
e1d56f9294
commit
14f9814bba
1 changed files with 3 additions and 3 deletions
|
@ -283,7 +283,7 @@ AssTime ReadSRTTime(std::string const& ts)
|
|||
size_t ci = 0;
|
||||
int ms_chars = 0;
|
||||
|
||||
for (; ci < ts.size(); ++ci)
|
||||
for (bool milliseconds = false; ci < ts.size() && !milliseconds; ++ci)
|
||||
{
|
||||
switch (ts[ci])
|
||||
{
|
||||
|
@ -298,13 +298,13 @@ AssTime ReadSRTTime(std::string const& ts)
|
|||
break;
|
||||
case ',':
|
||||
ci++;
|
||||
goto milliseconds;
|
||||
milliseconds = true;
|
||||
break;
|
||||
default:
|
||||
ci = ts.size();
|
||||
}
|
||||
}
|
||||
|
||||
milliseconds:
|
||||
for (; ci < ts.size(); ++ci)
|
||||
{
|
||||
if (!isdigit(ts[ci])) break;
|
||||
|
|
Loading…
Reference in a new issue