[PATCH] Canonicalize makeOwnCopy of multipatch engine

Richard Guenther rguenth at tat.physik.uni-tuebingen.de
Wed Jan 14 20:50:00 UTC 2004


Hi!

This makes the PAssert(valid) to an if as is done in all other Engines.
Fixes a problem noted by a guy that likes to mail me privately in german
rather than to the list ;)

Ok?

Richard.


2004Jan14  Richard Guenther <richard.guenther at uni-tuebingen.de>

	* src/Engine/MultiPatchEngine.cpp: don't assert validity
	in makeOwnCopy(), but rather ignore the request in the
	invalid case.

Index: src/Engine/MultiPatchEngine.cpp
===================================================================
RCS file: /home/pooma/Repository/r2/src/Engine/MultiPatchEngine.cpp,v
retrieving revision 1.53
diff -u -u -r1.53 MultiPatchEngine.cpp
--- src/Engine/MultiPatchEngine.cpp	6 May 2003 20:50:39 -0000	1.53
+++ src/Engine/MultiPatchEngine.cpp	14 Jan 2004 20:44:24 -0000
@@ -244,8 +244,7 @@
 Engine<Dim, T, MultiPatch<LayoutTag,PatchTag> >::
 makeOwnCopy()
 {
-  PAssert(data_m.isValid());
-  if (data_m.isShared()) {
+  if (data_m.isValid() && data_m.isShared()) {
     data_m.makeOwnCopy();
     pDirty_m = new bool(*pDirty_m);
   }



More information about the pooma-dev mailing list