[vlc-devel] [Patch] Adding an helper to convert iso8601 durations to seconds
Rémi Denis-Courmont
remi at remlab.net
Fri Dec 23 21:00:56 CET 2011
Hello,
On Wednesday 14 December 2011, Hugo Beauzée-Luyssen wrote:
> 2011/12/14 Rémi Denis-Courmont <remi at remlab.net>:
> > Le mercredi 14 décembre 2011 00:48:41 Hugo Beauzée-Luyssen, vous avez
écrit :
> >> On Tue, Dec 13, 2011 at 11:46 PM, Hugo Beauzée-Luyssen
> >>
> >> <beauze.h at gmail.com> wrote:
> >> > 2011/12/9 Rémi Denis-Courmont <remi at remlab.net>:
> >> >> Function name is too long. And time_t is thecorrect type for seconds
> >> >> IMHO.
> >>
> >> Oops, this one's the good one.
> >
> > I think this patch does not work due to typo. Please drop _to_s*. It's
> > obviously seconds since the return type is time_t.
>
> Hmmm yep you're right... my bad.
> Here are some fixed versions of both patches.
I hate defensive programming in internal functions. It encourages sloppy code.
While I don't know the ISO standard, I find it very suspicious to parse floating
point values according to the system locale.
And I don't see the use for this helper, at least in that patch series...
--
Rémi Denis-Courmont
http://www.remlab.info
More information about the vlc-devel
mailing list