News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Potentially unused variables

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mariculous

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.

Mariculous

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.

Ranran(retired)

I think the function uint16 get_population () const; declared in gebaeude.h is no longer used.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)