News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Potentially unused variables

Started by Sirius, February 20, 2020, 11:59:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sirius

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.

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Sirius

Oops, I'm sorry.
seconds_per_tick actually is used in physics code.
I intended to refer to the "simtime_factor"

jamespetts

Ahh, yes: I did not write the physics code, and I have no idea of its internal workings.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

wlindley

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.

[C] Ranran

I think the function uint16 get_population () const; declared in gebaeude.h is no longer used.