Turn off optimization to ensure that there is a clear linear correspondence between lines of code and the corresponding compiled instructions.
If it is compilation of the release mode, and retries is only a local variable that goes beyond the scope, the compiler can simply optimize the storage time of the extra value in the register that contains retries initially, but still use this case when checking the expression.
To confirm this, you will see that retries and errorTolerance have the same values ββin release mode, and retries have a value greater than one after recompiling in debug mode. Inspect the variables separately as you go through the lines.
source share