The analyzer has detected that identical expressions surround a compound assignment operator (+=, -=, *=, \=). The operation may be incorrect, or it can be simplified.
The example:
x += x + 5
In this case, it is intended to add 5 to the x variable, but incorrectly specified the x variable twice.
The fixed code:
x += 5
Most likely, the code is correct, but it is recommended to rewrite it to enhance readability: two additions of x can be replaced with a multiplication by 2.
More readable option:
x = x * 2 + 5;
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders: