From e2dbebed7339145e8c5624115773d8d9c7cf46a2 Mon Sep 17 00:00:00 2001 From: Juha Reunanen Date: Thu, 10 Jun 2021 21:12:19 +0300 Subject: [PATCH] Do not allocate an excessive amount of memory in example code. (#1788) This reverts commit de20b33dabfda58b1bf210450b2e61d71e552e67. --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 9a870eb..f2af42f 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -20613,7 +20613,7 @@ and errors (when we didn't deal correctly with semi-constructed objects consiste : mx(check_size(x)) , my(check_size(y)) // now we know x and y have a valid size - , data(mx*my*sizeof(int)) // will throw std::bad_alloc on error + , data(mx * my) // will throw std::bad_alloc on error { // picture is ready-to-use }