The International Simutrans Forum

Development => Bug Reports => Topic started by: Spike on February 29, 2012, 11:13:54 AM

Title: Code quality: uniform parameter ordering
Post by: Spike on February 29, 2012, 11:13:54 AM
Can we change procedures/method signatures, so that the parameter order is similar if the methods do similar tasks?

E.g. text with shadow has color first, then text pointer. Text without shadow has text pointer first, then color. It would be easier to remember if similar procedures had similar parameter sequences.

  display_proportional_clip(n.xpos, start_y + 4, msg, ALIGN_LEFT, color, true);
  display_shadow_proportional(n.xpos, start_y + 4, color_1, color_2, msg, true);

Yes, I wronged this all by myself long ago.