]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Break a loop early.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 8 Dec 2021 16:40:09 +0000 (09:40 -0700)
committerMatthias Maier <tamiko@43-1.org>
Wed, 12 Jan 2022 10:18:48 +0000 (04:18 -0600)
The scratch objects can be in the list only once, so once we find it, we
can stop the loop.

include/deal.II/base/work_stream.h

index 54b8c80bec36943811da9894eac04f92f4b3256b..4ab83ce9f020bb8f827677b8ea9dcaca3281d434 100644 (file)
@@ -590,6 +590,8 @@ namespace WorkStream
                   {
                     Assert(p->currently_in_use == true, ExcInternalError());
                     p->currently_in_use = false;
+
+                    break;
                   }
             }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.