From 7c68566196871377d0cf191f41a772d30c8a601b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Sat, 5 Dec 2015 20:50:08 +0100 Subject: [PATCH] Small typo --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 64a6b30..80255de 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -607,7 +607,7 @@ We can of course pass the number of elements along with the pointer: f2(new int[n], m); // bad: the wrong number of elements can be passed to f() } -Passing the number of elements as an argument is better (and far more common) that just passing the pointer and relying on some (unstated) convention for knowing or discovering the number of elements. However (as shown), a simple typo can introduce a serious error. The connection between the two arguments of `f2()` is conventional, rather than explicit. +Passing the number of elements as an argument is better (and far more common) than just passing the pointer and relying on some (unstated) convention for knowing or discovering the number of elements. However (as shown), a simple typo can introduce a serious error. The connection between the two arguments of `f2()` is conventional, rather than explicit. Also, it is implicit that `f2()` is supposed to `delete` its argument (or did the caller make a second mistake?).