Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made Server::getMessages() api more consistent by making it allways r…
…eturn an array.
- Loading branch information
fe83d77
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.
Instead of removing those lines we should just return an empty array directly, rather than continuing those other calls against nothing.
fe83d77
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.
I can do it. I just took the simpler option. It added close to no overhead, since it just got something already calculated, initializated an array, and then skipped the loop, but I'll change it to return an array.
fe83d77
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.
@tedivm I had forgotten about this PR. I've updated the branch in order to make it mergeable.