Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove assignments in conditionals #31

Open
sean-gilliam opened this issue Oct 16, 2019 · 3 comments
Open

Remove assignments in conditionals #31

sean-gilliam opened this issue Oct 16, 2019 · 3 comments

Comments

@sean-gilliam
Copy link
Collaborator

Assignments in conditionals while fun in the hackery sense tends to muddy logic clarity and tends to hide bugs.

if((victim = get_char_room(ch, arg2)) == NULL)

The above code is straight forward enough, however, if victim get used further down the method, it's hard to see were victim gets assigned.

We should consider removing assignments from conditionals.

@carewdavid
Copy link
Contributor

I'll clean some of those up.

@carewdavid carewdavid mentioned this issue Oct 23, 2019
@BackstreetCultist
Copy link

I'm happy to take a look.

@rezalas
Copy link
Owner

rezalas commented Oct 28, 2019

If there are any you can find and resolve @BackstreetCultist feel free. Quite a few were cleaned in #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants