[PATCH] Initialize PatchSwapLayout correctly

Jeffrey D. Oldham oldham at codesourcery.com
Wed Jul 14 21:43:00 UTC 2004


Richard Guenther wrote:

> Cures SEGFAULTing particle tests.
>
> Ok?
>
> Richard.
>
>
> 2004Jul14  Richard Guenther <richard.guenther at uni-tuebingen.de>
>
>     * src/Particles/PatchSwapLayout.h: initialize contextSizes_m
>     properly in default constructor.

Yes, this cures a distinct lack of symmetry in the PatchSwapLayout 
constructors.

>------------------------------------------------------------------------
>
>Index: PatchSwapLayout.h
>===================================================================
>RCS file: /home/pooma/Repository/r2/src/Particles/PatchSwapLayout.h,v
>retrieving revision 1.21
>diff -u -u -r1.21 PatchSwapLayout.h
>--- PatchSwapLayout.h	14 Jul 2004 15:44:59 -0000	1.21
>+++ PatchSwapLayout.h	14 Jul 2004 20:19:21 -0000
>@@ -587,7 +587,10 @@
>   //============================================================
> 
>   PatchSwapLayout()
>-    : patchInfo_m(0) {}
>+    : patchInfo_m(0)
>+    {
>+      contextSizes_m.initialize(Pooma::contexts());
>+    }
> 
>   // The main constructor takes a reference to the Layout_t type
>   // that we will use in the swap() routine.
>  
>


-- 
Jeffrey D. Oldham
oldham at codesourcery.com




More information about the pooma-dev mailing list