On Tuesday 17 November 2009 20:02:13 Steffen 'stefreak' Neubauer wrote:
On Tue, 17 Nov 2009 19:44:18 +0100
Holger Freyther zecke@selfish.org wrote:
I think it is one of the cases where a function call makes more sense?
Hmm, really? All this stuff is only needed (as far as i know, of course ;)) for the validity-period decoding - nowhere else. Would you really put all those small VPF-implementations into their own functions? At the moment only the service centre time stamp decoding has it's own function because it's needed elsewhere. Isn't it clear enough with 'goto'?
Yes, I would put all these into static methods... the compiler will inline them for you. The problem with this amount of gotos is it is really hard to understand which ways you are jumping. E.g. within "enhanced" you will do a backward jump. The problem with that it is very hard to make sure that your jumping will end... if/else if and function calls are much easier to read.
holger