The International Simutrans Forum

 

Author Topic: List of available vehicles (without building depot)  (Read 16610 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT ve

  • Devotee
  • *
  • Posts: 1190
    • Simutrans-BLOG
  • Languages: ES
Re: List of available vehicles (without building depot)
« Reply #35 on: December 19, 2014, 12:08:20 PM »

I support this extension. But where to place button (or so) to show it?
List Manager perhaps. ???

Offline Václav

  • Devotee
  • *
  • Posts: 3253
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: List of available vehicles (without building depot)
« Reply #36 on: December 19, 2014, 12:14:00 PM »
Yes, I think so. It is usable place. And there vehicles could be filtered by type or so, too.

Offline Ves

  • Devotee
  • *
  • Posts: 1661
  • Languages: EN, SV, DK
Re: List of available vehicles (without building depot)
« Reply #37 on: December 20, 2014, 06:16:10 AM »
That is the place i put the window. Everyone agrees that this is the place to put it?

Offline Spenk009

  • *
  • Posts: 242
Re: List of available vehicles (without building depot)
« Reply #38 on: December 20, 2014, 09:45:59 AM »
I agree, since it's a list it fits in there perfectly.

What thumbnail have you chosen?

Offline Ves

  • Devotee
  • *
  • Posts: 1661
  • Languages: EN, SV, DK
Re: List of available vehicles (without building depot)
« Reply #39 on: December 20, 2014, 12:42:06 PM »
I have made it possible to paint a new tumbnail, now I just use the signlist-thumbnail.

Offline Ves

  • Devotee
  • *
  • Posts: 1661
  • Languages: EN, SV, DK
Re: List of available vehicles (without building depot)
« Reply #40 on: December 28, 2014, 09:38:22 PM »
Im slowly getting forward, now the compile complaints with this error:

Code: [Select]
Error 2 error C2064: term does not evaluate to a function taking 2 arguments f:\spel\utveckla simutrans\simutrans källkod\simutrans.14.05.29\simutrans\trunk\tpl\vector_tpl.h 140 1 Simutrans

I have a strong suspicion that it is when i try to "fill list" I get that error. If I remove that section it compiles. I fail totally to figure out how to solve it, and it doesnt help that the error points to the vector-file instead of where in my code the problem is.

any ideas?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5497
  • Languages: EN, NO
Re: List of available vehicles (without building depot)
« Reply #41 on: December 28, 2014, 09:52:14 PM »
Line 140 in trunk vector_tpl.h is a call to the comparator function passed to insert_ordered. The comparator function you pass isn't a function taking two arguments. If I'm going to guess, it's because you pass a non-static member function, which has an implicit third parameter.

Offline Ves

  • Devotee
  • *
  • Posts: 1661
  • Languages: EN, SV, DK
Re: List of available vehicles (without building depot)
« Reply #42 on: December 28, 2014, 10:03:03 PM »
ah ok, so the class im trying to compare is having different amount of parameters than two?
Maybe also showing the output-section of the compiler could be helpfull to narrow down the problem

Code: [Select]
1>------ Build started: Project: Simutrans, Configuration: Release Win32 ------
1>  vehiclelist_frame_t.cc
1>gui\vehiclelist_frame_t.cc(18): warning C4005: 'SCL_HEIGHT' : macro redefinition
1>          f:\spel\utveckla simutrans\simutrans källkod\simutrans.14.05.29\simutrans\trunk\gui\extend_edit.h(22) : see previous definition of 'SCL_HEIGHT'
1>f:\spel\utveckla simutrans\simutrans källkod\simutrans.14.05.29\simutrans\trunk\dataobj\../tpl/vector_tpl.h(140): error C2064: term does not evaluate to a function taking 2 arguments
1>          gui\vehiclelist_frame_t.cc(95) : see reference to function template instantiation 'void vector_tpl<const vehikel_besch_t *>::insert_ordered<vehicle_scrollitem_t::sort_modes_t>(const T &,StrictWeakOrdering)' being compiled
1>          with
1>          [
1>              T=const vehikel_besch_t *
1>  ,            StrictWeakOrdering=vehicle_scrollitem_t::sort_modes_t
1>          ]
1>          gui\vehiclelist_frame_t.cc(95) : see reference to function template instantiation 'void vector_tpl<const vehikel_besch_t *>::insert_ordered<vehicle_scrollitem_t::sort_modes_t>(const T &,StrictWeakOrdering)' being compiled
1>          with
1>          [
1>              T=const vehikel_besch_t *
1>  ,            StrictWeakOrdering=vehicle_scrollitem_t::sort_modes_t
1>          ]
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5497
  • Languages: EN, NO
Re: List of available vehicles (without building depot)
« Reply #43 on: December 28, 2014, 11:30:17 PM »
ah ok, so the class im trying to compare is having different amount of parameters than two?

No, not the class you are comparing. It's the function you are, directly or indirectly, telling vector_tpl to use when comparing two vehicle_besch_t instances in insert_ordered.

And the code with problems is at line 95 in vehiclelist_frame_t.cc

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9472
  • Languages: De,EN,JP
Re: List of available vehicles (without building depot)
« Reply #44 on: January 06, 2015, 10:59:12 PM »
The comparing function ususally need to be static, since it is very tricky to init them with the corretc object in derived types.