From d13ac81e27a03bde0a36f3543978570ceb982c3a Mon Sep 17 00:00:00 2001 From: Martin Finke Date: Thu, 9 Nov 2017 05:18:11 +0100 Subject: [PATCH] Avoid magic constant --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 53c481a..87bad0c 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -3565,7 +3565,7 @@ The language guarantees that a `T&` refers to an object, so that testing for `nu array w; // ... public: - wheel& get_wheel(size_t i) { Expects(i < 4); return w[i]; } + wheel& get_wheel(size_t i) { Expects(i < w.size()); return w[i]; } // ... };