]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Let struct Record have a constructor. This works around a the
authordeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 14 Dec 2004 04:20:51 +0000 (04:20 +0000)
committerdeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 14 Dec 2004 04:20:51 +0000 (04:20 +0000)
present failure of gcc mainline to compile this file:
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18793

git-svn-id: https://svn.dealii.org/trunk@9814 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/sparse_direct.cc

index 5ea4ddc74e6066d54a42f5fcc62ad52798922e02..ebe0282494fc622d1e6b851e47ac12b9b2d64786 100644 (file)
@@ -267,6 +267,26 @@ namespace CommunicationsLog
       unsigned int          scheduled_bytes;
       unsigned int          completed_bytes;
       std::string           description;
+
+    /**
+     * Constructor
+     */
+    Record (const pid_t           child_pid,
+           const Direction       direction,
+           const std::type_info *type,
+           const unsigned int    count,
+           const  unsigned int   scheduled_bytes,
+           const unsigned int    completed_bytes,
+           const std::string    &description)
+      :
+      child_pid (child_pid),
+      direction (direction),
+      type (type),
+      count (count),
+      scheduled_bytes (scheduled_bytes),
+      completed_bytes (completed_bytes),
+      description (description)
+    {}
   };
 
                                    /**
@@ -292,8 +312,8 @@ namespace CommunicationsLog
                              const unsigned int completed_bytes,
                              const std::string &descr)
   {
-    const Record record = {child_pid, direction, &typeid(T), count,
-                          sizeof(T)*count, completed_bytes, descr};
+    const Record record(child_pid, direction, &typeid(T), count,
+                       sizeof(T)*count, completed_bytes, descr);
     Threads::ThreadMutex::ScopedLock lock (list_access_lock);
     communication_log.push_back (record);
   }

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.