]> 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)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 8 Dec 2021 16:40:09 +0000 (09:40 -0700)
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 13e23c3f8b512ac965b33b87286d067a7cb1fef5..a62ddc6e4ca79f2cb3913437c19c5b0aec2d95f3 100644 (file)
@@ -597,6 +597,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.