[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Corrupted List
From: |
Marcus G. Daniels |
Subject: |
Re: Corrupted List |
Date: |
17 Sep 1999 15:17:17 -0700 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4 |
>>>>> "D3" == donalson <address@hidden> writes:
D3> I put my code in the incomming dir.
I see two problems:
1) Conflicting use of listMember for two different lists.
2) A inner loop steps on an outer loop's index of the same name.
diff --ignore-all-space -r -c bugDoug/Cell.m bugDoug-/Cell.m
*** bugDoug/Cell.m Fri Sep 17 02:43:06 1999
--- bugDoug-/Cell.m Fri Sep 17 16:11:01 1999
***************
*** 64,70 ****
squareBoundary=[myModel getSpaceShape];
listType = [List customizeBegin: [self getZone]];
! [listType setIndexFromMemberLoc: offsetof( Mussel, listMember )];
listType = [listType customizeEnd];
cellMusselList=[listType create: aZone ];
--- 64,70 ----
squareBoundary=[myModel getSpaceShape];
listType = [List customizeBegin: [self getZone]];
! [listType setIndexFromMemberLoc: offsetof( Mussel, listMemberCell)];
listType = [listType customizeEnd];
cellMusselList=[listType create: aZone ];
diff --ignore-all-space -r -c bugDoug/Mussel.h bugDoug-/Mussel.h
*** bugDoug/Mussel.h Thu Sep 16 19:10:02 1999
--- bugDoug-/Mussel.h Fri Sep 17 16:11:13 1999
***************
*** 20,25 ****
--- 20,26 ----
id neighborsList;
//MusselCell * myCell;
member_t listMember;
+ member_t listMemberCell;
}
- displayMussels;
- (void)setGenerator: generator;
diff --ignore-all-space -r -c bugDoug/MusselModelSwarm.m
bugDoug-/MusselModelSwarm.m
*** bugDoug/MusselModelSwarm.m Fri Sep 17 14:38:12 1999
--- bugDoug-/MusselModelSwarm.m Fri Sep 17 16:11:57 1999
***************
*** 235,240 ****
--- 235,241 ----
index=[musselCellList begin: self];
while( (aCell=[index next]) )
{
+ id index;
//printf("cell=%u xMin=%f xMax=%f yMin=%f yMax=%f x=%d y=%d\n",
// aCell,aCell->xMin,aCell->xMax,aCell->yMin,
aCell->yMax,aCell->x,aCell->y);
tempList=[aCell getMusselList];
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.