[cig-commits] commit: Found some problems with the conversion from default to

Mercurial hg at geodynamics.org
Mon Feb 1 15:31:51 PST 2010


changeset:   378:c3955e3c1abc
branch:      pcu_rejig
user:        LukeHodkinson at localhost.localdomain
date:        Tue Jan 12 11:38:12 2010 +1100
files:       Utils/src/DiffusionSMT.c
description:
Found some problems with the conversion from default to
pcu_rejig.


diff -r ba4566299d3a -r c3955e3c1abc Utils/src/DiffusionSMT.c
--- a/Utils/src/DiffusionSMT.c	Thu Jan 07 17:32:08 2010 +1100
+++ b/Utils/src/DiffusionSMT.c	Tue Jan 12 11:38:12 2010 +1100
@@ -133,10 +133,11 @@ void* _DiffusionSMT_DefaultNew( Name nam
 
 void _DiffusionSMT_AssignFromXML( void* matrixTerm, Stg_ComponentFactory* cf, void* data ) {
     DiffusionSMT*            self             = (DiffusionSMT*)matrixTerm;
-    PICelleratorContext*     context	      = (PICelleratorContext*)self->context;
+    PICelleratorContext*     context;
 
     /* Construct Parent */
     _StiffnessMatrixTerm_AssignFromXML( self, cf, data );
+    context = (PICelleratorContext*)self->context;
 
     _DiffusionSMT_Init( self );
 
@@ -159,10 +160,8 @@ void _DiffusionSMT_Build( void* matrixTe
     _StiffnessMatrixTerm_Build( self, data );
 
     /* Get Component Factory if we can */
-    if ( Stg_Class_IsInstance( data, AbstractContext_Type ) ) {
-	context = (AbstractContext*) data;
-	cf = context->CF;
-    }
+    context = self->context;
+    cf = context->CF;
 
     /* Sort out material extension stuff */
     self->materialExtHandle = Materials_Register_AddMaterialExtension(



More information about the CIG-COMMITS mailing list