From 1c3187844f844cf6ff10d27b0d136026ec9e4a23 Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Wed, 13 Jan 2016 18:57:50 +0000 Subject: [PATCH] Simplified erase_after code. --- basic_intrusive_forward_list.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/basic_intrusive_forward_list.h b/basic_intrusive_forward_list.h index 9af8c075..94d5b0d1 100644 --- a/basic_intrusive_forward_list.h +++ b/basic_intrusive_forward_list.h @@ -519,14 +519,7 @@ namespace etl p_first = p_next; // Move to the next node. } - if (p_next == nullptr) - { - return end(); - } - else - { - return iterator(*p_last); - } + return last; } //*************************************************************************