From f6e94fb504c289558d09e8924c3ff401222cce40 Mon Sep 17 00:00:00 2001 From: Carl Reinke Date: Fri, 18 Sep 2015 19:39:12 -0600 Subject: [PATCH] Fix typo: "loose" to "lose" --- CppCoreGuidelines.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 4c5d4bd..792f155 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -629,14 +629,14 @@ This design carries the number of elements along as an integral part of an objec return v; } - unique_ptr f6(int n) // bad: looses n + unique_ptr f6(int n) // bad: loses n { auto p = make_unique(n); // ... initialize *p ... return p; } - owner f7(int n) // bad: looses n and we might forget to delete + owner f7(int n) // bad: loses n and we might forget to delete { owner p = new int[n]; // ... initialize *p ... @@ -5904,7 +5904,7 @@ Write your own factory wrapper if there is not one already. ### R.14: ??? array vs. pointer parameter -**Reason**: An array decays to a pointer, thereby loosing its size, opening the opportunity for range errors. +**Reason**: An array decays to a pointer, thereby losing its size, opening the opportunity for range errors. **Example**: