Repository navigation
Fix issue 9103: False positive duplicateConditionAssign - #1808
Conversation
|
I would like to see some kind of clarification of the error message also. Just a suggestion; the current message does not really say what the problem is. Say something about the fundamental reason why we added this warning. In my humble opinion the message But well.. feel free to figure out some clarification and then we can ask orbitcowboy if he thinks that is good. |
We can say something like: |
That sounds good to me. @orbitcowboy what do you think about this suggestion? |
Lgtm. Thanks! |
|
Well, that is not exactly true for complex types, is it? |
void foo(A& x, A&y)
{
if (x!=y)
x=y;Here the assignment might be much more expensive than the comparison. |
If there is some code that is better to not rewrite.. then please report it as FP. |
No description provided.