freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Canonicalize makeOwnCopy of multipatch engine


From: Richard Guenther
Subject: [PATCH] Canonicalize makeOwnCopy of multipatch engine
Date: Wed, 14 Jan 2004 21:50:00 +0100 (CET)

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 <address@hidden>

        * 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);
   }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]