[PATCH] Canonicalize makeOwnCopy of multipatch engine

Jeffrey D. Oldham oldham at codesourcery.com
Fri Jan 16 02:55:08 UTC 2004


Richard Guenther wrote:
> 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?

ja. ;)

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


-- 
Jeffrey D. Oldham
oldham at codesourcery.com




More information about the pooma-dev mailing list