[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] (no subject)
From: |
Markus Bürg |
Subject: |
[Getfem-commits] (no subject) |
Date: |
Mon, 10 Sep 2018 07:52:00 -0400 (EDT) |
branch: mb-Fix_distributed_structures_for_arbitrary_number_of_threads
commit 2b08ba6ab23fea03efe1828cc027f42bb1cf4f6a
Author: mb <address@hidden>
Date: Mon Sep 10 13:51:51 2018 +0200
Terminate loop, if less than two elements are left.
---
src/getfem_models.cc | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/getfem_models.cc b/src/getfem_models.cc
index 294d173..4f55c21 100644
--- a/src/getfem_models.cc
+++ b/src/getfem_models.cc
@@ -1850,9 +1850,7 @@ namespace getfem {
}
}
//erase every second item , as it was already added
- for (auto it = begin(to_add); it < end(to_add);){
- if (next(it) < end(to_add)) it = to_add.erase(next(it));
- }
+ for (auto it = begin(to_add); next(it) < end(to_add); it =
to_add.erase(next(it)));
}
}
};