The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended bug reports => Topic started by: Mariculous on February 20, 2020, 11:59:56 PM

Title: Potentially unused variables
Post by: Mariculous on February 20, 2020, 11:59:56 PM
I am a little confused about seconds_per_tick

My IDE clearly states it as unused.
Did I miss anything about that parameter?
What exactly does it do, or what exactly is it supposed to do?

My IDE had found some further unused variables and functions. I will, however only change distance, time, speed related stuff in this branch.
Title: Re: Potentially unused variables
Post by: jamespetts on February 21, 2020, 12:29:06 AM
I think that this may have been added by someone else a long time ago; I cannot recall exactly how, if at all, this fits into the timing system now.
Title: Re: Potentially unused variables
Post by: Mariculous on February 21, 2020, 12:51:02 AM
Oops, I'm sorry.
seconds_per_tick actually is used in physics code.
I intended to refer to the "simtime_factor"
Title: Re: Potentially unused variables
Post by: jamespetts on February 21, 2020, 02:09:36 AM
Ahh, yes: I did not write the physics code, and I have no idea of its internal workings.
Title: Re: Potentially unused variables
Post by: wlindley on February 21, 2020, 04:39:43 PM
simtime_factor seems to be a function returning a constant value.  The function is never called, and everything compiles and runs properly without it.  Probably no reason to keep cruft laying about.
Title: Re: Potentially unused variables
Post by: RESTRICTED ACCOUNT on May 04, 2020, 01:06:52 PM
I think the function uint16 get_population () const; declared in gebaeude.h is no longer used.