Conform to new scoping rules for variables defined in a for loop

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3245 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
haydentech 2003-05-14 15:24:36 +00:00
parent cf8525ee3c
commit e1d7ae79b2

View File

@ -172,6 +172,7 @@ BShape::~BShape()
status_t BShape::Archive(BMessage *archive, bool deep) const
{
status_t err = BArchivable::Archive(archive, deep);
int32 i;
if (err != B_OK)
return err;
@ -186,7 +187,7 @@ status_t BShape::Archive(BMessage *archive, bool deep) const
archive->AddData("pts", B_POINT_TYPE, data->ptList, sizeof(BPoint), true,
data->ptCount);
for (int32 i = 1; i < data->ptCount; i++)
for (i = 1; i < data->ptCount; i++)
archive->AddPoint("pts", data->ptList[i]);
// Avoids allocation for each op