Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
warning C4706: assignment within conditional expression No functional change.
- Loading branch information
warning C4706: assignment within conditional expression No functional change.
92f01aa
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.
Wouldn't it be a better fix to disable this silly warning ? Original code was more readable.
92f01aa
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.
The warning may be silly in this case but in other cases may be very useful to catch subtle bugs, moreover the original version is not idiomatic and actually it is very rare. It is much more common the case with ==, so a reader could reasonably wonder if 'mainThread->easyMovePlayed = doEasyMove' it is actually intended or it is a bug....now the reader does not wonder anymore :-)
92f01aa
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.
An alternative which might be more readable: