Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the unecessary lower-bound channel limit checks
This commit removes the channelLimit < ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT checks because they're always false (and aren't needed to ensure the channel limit is within-bounds). Here's why: 1. channelLimit is unsigned, so it's always zero or greater. 2. The 'if' branch already handles the case where channelLimit is zero, which is an alias for the maximum limit (per the API description). 3. Therefore, the else branch is only called when channelLimit is between 1 and ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT, inclusively. These bounds are perfectly valid, so the else condition is always false and isn't needed.
- Loading branch information