From a361c37f5ee2af743a7cac6e8b42463e770ad86c Mon Sep 17 00:00:00 2001 From: Thibault Kruse Date: Wed, 24 Aug 2016 12:44:47 +0200 Subject: [PATCH] unique funIds --- CppCoreGuidelines.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 264d38b..81b447c 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -17323,14 +17323,14 @@ Dynamic accesses into arrays are difficult for both tools and humans to validate // ALTERNATIVE A: Use a span // A1: Change parameter type to use span - void f(span a, int pos) + void f1(span a, int pos) { a[pos / 2] = 1; // OK a[pos - 1] = 2; // OK } // A2: Add local span and use that - void f(array arr, int pos) + void f2(array arr, int pos) { span a = {arr, pos} a[pos / 2] = 1; // OK @@ -17338,7 +17338,7 @@ Dynamic accesses into arrays are difficult for both tools and humans to validate } // ALTERNATIVE B: Use at() for access - void f(array a, int pos) + void f3(array a, int pos) { at(a, pos / 2) = 1; // OK at(a, pos - 1) = 2; // OK