While on the topic of asserts, I recommend using a macro similar to
the ASSERT_OR_RETURN that I wrote for Warzone2100 --

The reason for this is that 1) you avoid having to do such double
evaluations, and 2) you quickly get into the (addictive) habit of
writing defensive code that fails softly for non-debug builds.

Also a more descriptive ASSERT() macro with comments (see above link)
helps when debugging.

Feel free to copy & paste this code ;)

  - Per

Freeciv-dev mailing list

Reply via email to