The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Ashley on February 17, 2012, 05:10:29 PM

Title: simplan.h - anonymous union
Post by: Ashley on February 17, 2012, 05:10:29 PM
While working on compiling Simutrans using Xcode I found that it was having trouble coping with using an anonymous union in the planquadrat_t object with the swap template:


void swap(planquadrat_t& a, planquadrat_t& b)
{
sim::swap(a.this_halt, b.this_halt);
sim::swap(a.halt_list, b.halt_list);
sim::swap(a.ground_size, b.ground_size);
sim::swap(a.halt_list_count, b.halt_list_count);
sim::swap(a.data, b.data);
}


Giving the union a name seems to fix this. One-line patch attached.