There are many places within MaNGOS code in which we have an ID to compare against a list, typically using bit masks. Only one entry in the list is valid.
Rather than using a series of else if statements so that the fucntion stops once it hits a positive, I am often seeing a chain of if statements, forcing the function to keep comparing bitmasks needlessly. A fantastic example of this is EffectDummy() in SpellEffects.cpp. Some clever use of case statements makes it less tedious, but even then the case statements usually run in addition to if statements.
This seems to be fairly consistent, and it puzzles me. Wouldn't it be more efficient to use else if statements for every bit mask comparison after the first? Even better, if there's a case statement as well, wouldn't we be better off putting a chain of else if statements in the default case?