From 652a93ef4601a1443e8b1284fdfb8a19695c65bb Mon Sep 17 00:00:00 2001 From: Gustav Jansson Date: Mon, 28 Jun 2021 05:52:00 +0200 Subject: [PATCH] [Pro.safety] Changed lettered list to a numbered (isocpp#1800) (#1801) * Changed lettered list to a numbered (isocpp##1800) * Added blank line for CI (isocpp##1800) --- CppCoreGuidelines.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 9c6e57f..eea372c 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -20946,10 +20946,11 @@ An implementation of this profile shall recognize the following patterns in sour Type safety profile summary: * Type.1: [Avoid casts](#Res-casts): -a. Don't use `reinterpret_cast`; A strict version of [Avoid casts](#Res-casts) and [prefer named casts](#Res-casts-named). -b. Don't use `static_cast` for arithmetic types; A strict version of [Avoid casts](#Res-casts) and [prefer named casts](#Res-casts-named). -c. Don't cast between pointer types where the source type and the target type are the same; A strict version of [Avoid casts](#Res-casts). -d. Don't cast between pointer types when the conversion could be implicit; A strict version of [Avoid casts](#Res-casts). + 1. Don't use `reinterpret_cast`; A strict version of [Avoid casts](#Res-casts) and [prefer named casts](#Res-casts-named). + 2. Don't use `static_cast` for arithmetic types; A strict version of [Avoid casts](#Res-casts) and [prefer named casts](#Res-casts-named). + 3. Don't cast between pointer types where the source type and the target type are the same; A strict version of [Avoid casts](#Res-casts). + 4. Don't cast between pointer types when the conversion could be implicit; A strict version of [Avoid casts](#Res-casts). + * Type.2: Don't use `static_cast` to downcast: [Use `dynamic_cast` instead](#Rh-dynamic_cast). * Type.3: Don't use `const_cast` to cast away `const` (i.e., at all):