]> https://gitweb.dealii.org/ - dealii.git/commitdiff
No longer rely on internals of ThreadLocalStorage in LogStream.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 24 Apr 2024 20:37:05 +0000 (14:37 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 24 Apr 2024 22:29:43 +0000 (16:29 -0600)
source/base/logstream.cc

index 3c0ba32edbc7d5634f42e6b33fb343d4ba3620bf..495cd0be3c8dd8eea07b3421d2b36c80ab499980 100644 (file)
@@ -386,11 +386,11 @@ LogStream::get_prefixes() const
 
   // If this is a new locally stored stack, copy the "blessed" prefixes
   // from the initial thread that created logstream.
-  if (!exists)
+  if (exists == false)
     {
-      auto it = prefixes.data.find(parent_thread);
-      if (it != prefixes.data.end())
-        local_prefixes = it->second;
+      const auto parent_prefixes = prefixes.get_for_thread(parent_thread);
+      if (parent_prefixes)
+        local_prefixes = parent_prefixes.value();
     }
 
   return local_prefixes;

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.