Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lobby Info: simplified player list sorting code by @Ja-MiT
- Loading branch information
Showing
1 changed file
with
1 addition
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29e7e57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't any more simple IMO...
29e7e57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be more accurate, I had presented this approach as a simplification to cfed64d, which has since been converted to the pair of
if
statements. Also, I presented this approach as part of an example of why trying to cram complex logic into a singlereturn
statement is often not a good idea. (While it is a single line of source code, it should produce the same executable code, at least with a decent optimizing compiler. At the same time, the single line is harder for humans to read.)If I were to try to simplify the current code, I would instead favor the snippet I presented earlier in the discussion of PR 2099.