From e3023f46d29a6b3e582a73c927918f7865ce8923 Mon Sep 17 00:00:00 2001 From: deal Date: Tue, 14 Dec 2004 04:20:51 +0000 Subject: [PATCH] Let struct Record have a constructor. This works around a the 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 | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/deal.II/lac/source/sparse_direct.cc b/deal.II/lac/source/sparse_direct.cc index 5ea4ddc74e..ebe0282494 100644 --- a/deal.II/lac/source/sparse_direct.cc +++ b/deal.II/lac/source/sparse_direct.cc @@ -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); } -- 2.39.5