[Freeciv-Dev] contains_special type safe?
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
/***************************************************************
Returns TRUE iff the given special is found in the given set.
***************************************************************/
bool contains_special(enum tile_special_type set,
enum tile_special_type to_test_for)
{
enum tile_special_type masked = set & to_test_for;
assert(0 == (int) S_NO_SPECIAL);
/*
* contains_special should only be called with one S_* in
* to_test_for.
*/
assert(masked == S_NO_SPECIAL || masked == to_test_for);
return masked == to_test_for;
}
surely this can't be correct: enum tile_special_type set is in general not
an enum tile_special_type...
-mike
- [Freeciv-Dev] contains_special type safe?,
Mike Kaufman <=
|
|