The International Simutrans Forum

 

Author Topic: 2 fixes for fabrikbauer  (Read 1418 times)

0 Members and 1 Guest are viewing this topic.

Offline eipi

  • *
  • Posts: 67
  • Languages: DE EN FR ES C++ LaTeX
2 fixes for fabrikbauer
« on: October 26, 2013, 07:00:50 PM »
This patch fixes 2 issues in fabrikbauer_t:
  • The old besch should be deleted if another one with the same name is registered
  • increase_industry_density(): ignoring climates did not work correctly

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4869
  • Languages: EN, DE, AT
Re: 2 fixes for fabrikbauer
« Reply #1 on: October 26, 2013, 07:15:50 PM »
thank you, nice spotted! Deletion of besch-pointers does not make much sense, as these besch classes lack proper destructors, that said, no child nodes will be deleted.

Offline eipi

  • *
  • Posts: 67
  • Languages: DE EN FR ES C++ LaTeX
Re: 2 fixes for fabrikbauer
« Reply #2 on: October 28, 2013, 02:32:21 PM »
Oh ok, I just thought it was consistent with how brueckenbauer_t (etc.) handle duplicated beschs.
But the bug in increase_industry_density() is really a bug, though, I just double checked  ;)

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4869
  • Languages: EN, DE, AT
Re: 2 fixes for fabrikbauer
« Reply #3 on: October 28, 2013, 05:10:03 PM »
you are right - in r6860 (including delete old besch and correct spelling)