From e255d23522a0ffe2a569186f27c46788e6434412 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Sun, 6 Mar 2016 13:30:35 +0000 Subject: [PATCH] Removed redundant loop --- src/ivector.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ivector.h b/src/ivector.h index 5c09e66a..1725cf98 100644 --- a/src/ivector.h +++ b/src/ivector.h @@ -198,12 +198,9 @@ namespace etl // Size up or size down? if (new_size > current_size) { - for (size_t i = current_size; i < new_size; ++i) + while (current_size < new_size) { - while (current_size < new_size) - { - create_element(); - } + create_element(); } } else if (new_size < current_size)