You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Don't cast between pointer types when the conversion could be implicit."
12
12
13
-
**C++ Core Guidelines**:
13
+
**C++ Core Guidelines**:\
14
14
Type.1: Avoid casts
15
15
16
16
In some cases, implicit casts between pointer types are safe and don't require you to write a specific cast expression. This rule finds instances of unnecessary casts you can safely remove.
17
17
18
18
## Remarks
19
19
20
-
The rule ID should be interpreted as "Implicit cast isn't used where it's acceptable."
20
+
The rule ID should be interpreted as "An implicit cast isn't used where it's acceptable."
21
21
22
22
This rule is only applicable to pointers. It checks static casts and reinterpret casts.
23
23
24
-
These cases are acceptable pointer conversions that should not use explicit cast expressions:
24
+
These cases are acceptable pointer conversions that shouldn't use explicit cast expressions:
25
25
- conversion to `nullptr_t`;
26
26
- conversion to `void*`;
27
27
- conversion from a derived type to its base when invoking a base member function that's not hidden by the derived type.
0 commit comments