From f1981f9e996c6803a24b900a2e2c44a323398cfe Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Wed, 23 Sep 2015 05:40:07 -0700 Subject: [PATCH] Fix obscure precondition expression --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 4092ffe..03b4679 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -1094,7 +1094,7 @@ We don't need to mention it for each member function. int area(int height, int width) { Expects(height>0 && width>0); // good - if (height>0 && width>0) my_error(); // obscure + if (height<=0 || width<=0) my_error(); // obscure // ... }