This diagnostic rule was added at users' request.
The analyzer allows you to detect all the explicit floating-point type conversions to integer signed types.
Consider some examples of constructs the analyzer will generate this diagnostic message on:
float f;
double d;
long double ld;
int i;
short s;
...
i = int(f); // V2003
s = static_cast<short>(d); // V2003
i = (int)ld; // V2003
V2004 is a related diagnostic message.
This diagnostic is classified as:
|
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:
Take
a chance!