From cc45432b01506831e7f949148bc9e9664bf7f8b2 Mon Sep 17 00:00:00 2001 From: Emmanuel Briot Date: Wed, 30 Sep 2015 12:05:07 +0200 Subject: [PATCH] Minor typo fixes --- CppCoreGuidelines.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index dc84273..317bb09 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -1945,7 +1945,7 @@ Avoid "esoteric techniques" such as: **See also**: [implicit arguments](#Ri-explicit). **Enforcement**: This is a philosophical guideline that is infeasible to check directly and completely. -However, many of the the detailed rules (F.16-F.45) can be checked, +However, many of the detailed rules (F.16-F.45) can be checked, such as passing a `const int&`, returning an `array` by value, and returning a pointer to free store alloced by the function. @@ -3448,7 +3448,7 @@ The idiom of having constructors acquire resources and destructors release them // ... } - void is_valid()() { return valid; } + void is_valid() { return valid; } void read(); // read from f // ... }; @@ -3458,7 +3458,7 @@ The idiom of having constructors acquire resources and destructors release them X3 file {"Heraclides"}; file.read(); // crash or bad read! // ... - if (is_valid()()) { + if (is_valid()) { file.read(); // ... } @@ -3892,13 +3892,13 @@ Types can be defined to move for logical as well as performance reasons. if (a.sz>sz) { // ... use the swap technique, it can't be bettered ... - *return *this + return *this } // ... copy sz elements from *a.elem to elem ... if (a.sz