freepooma-devel
[Top][All Lists]
Advanced

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

[PATCH] fix FieldEngine::makeOwnCopy()


From: Richard Guenther
Subject: [PATCH] fix FieldEngine::makeOwnCopy()
Date: Wed, 18 Dec 2002 23:46:03 +0100 (CET)

The following patch tries to make FieldEngine::makeOwnCopy() compile
and work. Tested by compiling and running some application code.

I dont really know if this is the right fix - but it appearantly
works for me. Maybe we need a testcase.


2002Dec18  Richard Guenther <address@hidden>

        * Field/FieldEngine/FieldEngine.h (makeOwnCopy): fix non-compiling
        code.

--- src/Field/FieldEngine/FieldEngine.h 1 Jul 2002 22:25:53 -0000       1.3
+++ src/Field/FieldEngine/FieldEngine.h 18 Dec 2002 22:41:20 -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]