[cig-commits] commit: Added missing 'return self' in the public _New() functions of these guys.

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


changeset:   369:4c94cccc15be
branch:      pcu_rejig
user:        JericoRevote
date:        Mon Dec 21 15:45:47 2009 +1100
files:       MaterialPoints/src/IntegrationPointsSwarm.c MaterialPoints/src/MappedParticleLayout.c Utils/src/PCDVC.c Weights/src/DVCWeights.c Weights/src/MomentBalanceWeights.c Weights/src/VolumeWeights.c
description:
Added missing 'return self' in the public _New() functions of these guys.


diff -r b40c29c94c09 -r 4c94cccc15be MaterialPoints/src/IntegrationPointsSwarm.c
--- a/MaterialPoints/src/IntegrationPointsSwarm.c	Fri Dec 18 16:51:48 2009 +1100
+++ b/MaterialPoints/src/IntegrationPointsSwarm.c	Mon Dec 21 15:45:47 2009 +1100
@@ -113,6 +113,7 @@ IntegrationPointsSwarm* IntegrationPoint
          swarmVariable_Register,
          comm, 
          ics_dummy );
+
    _IntegrationPointsSwarm_Init( 
       self,
       mesh, 
@@ -121,8 +122,9 @@ IntegrationPointsSwarm* IntegrationPoint
       mapper,
       materials_Register,
       recalculateWeights );
+
+	return self;
 }
-
 
 void* _IntegrationPointsSwarm_DefaultNew( Name name ) {
 	/* Variables set in this function */
diff -r b40c29c94c09 -r 4c94cccc15be MaterialPoints/src/MappedParticleLayout.c
--- a/MaterialPoints/src/MappedParticleLayout.c	Fri Dec 18 16:51:48 2009 +1100
+++ b/MaterialPoints/src/MappedParticleLayout.c	Mon Dec 21 15:45:47 2009 +1100
@@ -49,15 +49,18 @@ const Type MappedParticleLayout_Type = "
 const Type MappedParticleLayout_Type = "MappedParticleLayout";
 
 MappedParticleLayout* MappedParticleLayout_New( 
-      Name name, 
-      AbstractContext* context,
-      CoordSystem      coordSystem,
-      Bool             weightsInitialisedAtStartup) {
+	Name					name, 
+	AbstractContext*	context,
+	CoordSystem			coordSystem,
+	Bool					weightsInitialisedAtStartup )
+{
 
    MappedParticleLayout* self = _MappedParticleLayout_DefaultNew( name ); 
 
    _ParticleLayout_Init( self, context, coordSystem, weightsInitialisedAtStartup );
    _MappedParticleLayout_Init( self );
+
+	return self;
 }
 MappedParticleLayout* _MappedParticleLayout_New(  MAPPEDPARTICLELAYOUT_DEFARGS  )
 {
diff -r b40c29c94c09 -r 4c94cccc15be Utils/src/PCDVC.c
--- a/Utils/src/PCDVC.c	Fri Dec 18 16:51:48 2009 +1100
+++ b/Utils/src/PCDVC.c	Mon Dec 21 15:45:47 2009 +1100
@@ -143,6 +143,8 @@ PCDVC* PCDVC_New(
     _WeightsCalculator_Init( self, dim );
     _DVCWeights_Init( self, res );
     _PCDVC_Init( self, mps, upT, lowT, maxDeletions, maxSplits, splitInInterfaceCells, deleteInInterfaceCells, Inflow, CentPosRatio, ParticlesPerCell, Threshold );
+
+	return self;
 }
 
 PCDVC* _PCDVC_New(  PCDVC_DEFARGS  ) {
diff -r b40c29c94c09 -r 4c94cccc15be Weights/src/DVCWeights.c
--- a/Weights/src/DVCWeights.c	Fri Dec 18 16:51:48 2009 +1100
+++ b/Weights/src/DVCWeights.c	Mon Dec 21 15:45:47 2009 +1100
@@ -80,11 +80,13 @@ const Type DVCWeights_Type = "DVCWeights
 ** Constructors
 */
 DVCWeights* DVCWeights_New( Name name, Dimension_Index dim, int *res ) {
-    DVCWeights *self = _DVCWeights_DefaultNew( name );
+	DVCWeights *self = _DVCWeights_DefaultNew( name );
 
-    self->isConstructed = True;
-    _WeightsCalculator_Init( self, dim );
-    _DVCWeights_Init( self, res );
+	self->isConstructed = True;
+	_WeightsCalculator_Init( self, dim );
+	_DVCWeights_Init( self, res );
+
+	return self;
 }
 
 DVCWeights* _DVCWeights_New(  DVCWEIGHTS_DEFARGS  ) {
diff -r b40c29c94c09 -r 4c94cccc15be Weights/src/MomentBalanceWeights.c
--- a/Weights/src/MomentBalanceWeights.c	Fri Dec 18 16:51:48 2009 +1100
+++ b/Weights/src/MomentBalanceWeights.c	Mon Dec 21 15:45:47 2009 +1100
@@ -65,16 +65,18 @@ const Type MomentBalanceWeights_Type = "
 */
 
 MomentBalanceWeights* MomentBalanceWeights_New( Name name, Dimension_Index dim, WeightsCalculator* backupWeights ) {
-    MomentBalanceWeights* self = _MomentBalanceWeights_DefaultNew( name );
+	MomentBalanceWeights* self = _MomentBalanceWeights_DefaultNew( name );
 
-    self->isConstructed = True;
-    _WeightsCalculator_Init( self, dim );
-    _MomentBalanceWeights_Init( self, backupWeights );
+	self->isConstructed = True;
+	_WeightsCalculator_Init( self, dim );
+	_MomentBalanceWeights_Init( self, backupWeights );
+
+	return self;
 }
 
 MomentBalanceWeights* _MomentBalanceWeights_New(  MOMENTBALANCEWEIGHTS_DEFARGS  ) {
-    MomentBalanceWeights* self;
-
+	MomentBalanceWeights* self;
+	
     /* Allocate memory */
     assert( _sizeOfSelf >= sizeof(MomentBalanceWeights) );
     self = (MomentBalanceWeights*)_WeightsCalculator_New(  WEIGHTSCALCULATOR_PASSARGS  ); 
diff -r b40c29c94c09 -r 4c94cccc15be Weights/src/VolumeWeights.c
--- a/Weights/src/VolumeWeights.c	Fri Dec 18 16:51:48 2009 +1100
+++ b/Weights/src/VolumeWeights.c	Mon Dec 21 15:45:47 2009 +1100
@@ -43,11 +43,13 @@ const Type VolumeWeights_Type = "VolumeW
 ** Constructors
 */
 VolumeWeights* VolumeWeights_New( Name name, Dimension_Index dim, Stg_Shape* shape, FeMesh* mesh ) {
-    VolumeWeights *self = _VolumeWeights_DefaultNew( name );
+	VolumeWeights *self = _VolumeWeights_DefaultNew( name );
 
-    self->isConstructed = True;
-    _WeightsCalculator_Init( self, dim );
-    _VolumeWeights_Init( self, shape, mesh );
+	self->isConstructed = True;
+	_WeightsCalculator_Init( self, dim );
+	_VolumeWeights_Init( self, shape, mesh );
+
+	return self;
 }
 
 VolumeWeights* _VolumeWeights_New(  VOLUMEWEIGHTS_DEFARGS  ) {



More information about the CIG-COMMITS mailing list