[Freeciv-Dev] Re: Strange commit
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 11 Aug 2005, Raimar Falke wrote:
> > +case S_HUT:
> > +case S_FORTRESS:
> > +case S_SPECIAL_2:
> > +case S_RIVER:
> > +case S_FARMLAND:
> > +case S_AIRBASE:
> > +case S_FALLOUT:
> > +case S_LAST:
> > + break;
>
> I think there should be a default branch with an assert.
I prefer it like this, because gcc will give a warning when there is a new
enum that the switch does not catch. It is much easier to find missing
treatments of a new enum this way rather than rely on eyeballs/grep or to
run the game until it asserts (if it ever does during testing).
- Per
|
|