freepooma-devel
[Top][All Lists]
Advanced

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

[PATCH] Re: [pooma-dev] [BUG] FieldEngine::makeOwnCopy() does not compil


From: Richard Guenther
Subject: [PATCH] Re: [pooma-dev] [BUG] FieldEngine::makeOwnCopy() does not compile
Date: Mon, 21 Oct 2002 12:21:31 +0200 (CEST)

On Fri, 18 Oct 2002, Richard Guenther wrote:

> FieldEngine::makeOwnCopy() does not compile and I cant figure out how the
> current "structure" of it should work. Can anybody enlighten me or fix the
> problem?

Ok, I needed this so I sat down and at least fixed it (probably not in an
optimal way, but it seems to work). Apply the following

Index: src/Field/FieldEngine/FieldEngine.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/Field/FieldEngine/FieldEngine.h,v
retrieving revision 1.3
diff -u -r1.3 FieldEngine.h
--- src/Field/FieldEngine/FieldEngine.h 1 Jul 2002 22:25:53 -0000       1.3
+++ src/Field/FieldEngine/FieldEngine.h 21 Oct 2002 10:20:11 -0000
@@ -587,6 +587,10 @@
   {
     PAssert(data_m.isValid());

+    // Remember data_m as model
+
+    RefCountedBlockPtr<Data_t> model = data_m;
+
     // Create a blank slate of engines:

     data_m = RefCountedBlockPtr<Data_t>();
@@ -600,7 +604,7 @@
     {
       for (int c = 0; c < centering_m.size(); ++ c)
       {
-        data(m, c) = model.data(m, c);
+        data(m, c) = model[m*stride_m + c];
         data(m, c).engine().makeOwnCopy();
         data(m, c).relations().makeOwnCopy(s);
       }

reply via email to

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