From 79c38f94b7ad635e28e41ebb6dd8bbfa22e944ae Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Sat, 16 Nov 2013 10:10:42 +0100 Subject: [PATCH] Parker-Lenhard: work around a debug mode bug of GCC 4.4 The resize() method for std::vector seems to copy an uninitialized object for the new objects in the array on GCC 4.4. This means that we should not assume that the copied objects are finalized in the Parker-Lenhard parameters. Strangely enough this only seems to affect older GCCs (at least 4.4) and only in debug mode... --- opm/material/fluidmatrixinteractions/ParkerLenhardParams.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opm/material/fluidmatrixinteractions/ParkerLenhardParams.hpp b/opm/material/fluidmatrixinteractions/ParkerLenhardParams.hpp index f6eb466df..bcfaa47b1 100644 --- a/opm/material/fluidmatrixinteractions/ParkerLenhardParams.hpp +++ b/opm/material/fluidmatrixinteractions/ParkerLenhardParams.hpp @@ -58,8 +58,8 @@ public: ParkerLenhardParams(const ParkerLenhardParams &p) { currentSnr_ = 0; - SwrPc_ = p.SwrPc(); - mdc_ = new ScanningCurve(p.SwrPc()); + SwrPc_ = p.SwrPc_; + mdc_ = new ScanningCurve(SwrPc_); pisc_ = csc_ = NULL; #ifndef NDEBUG