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:
parent
cf8525ee3c
commit
e1d7ae79b2
@ -172,6 +172,7 @@ BShape::~BShape()
|
|||||||
status_t BShape::Archive(BMessage *archive, bool deep) const
|
status_t BShape::Archive(BMessage *archive, bool deep) const
|
||||||
{
|
{
|
||||||
status_t err = BArchivable::Archive(archive, deep);
|
status_t err = BArchivable::Archive(archive, deep);
|
||||||
|
int32 i;
|
||||||
|
|
||||||
if (err != B_OK)
|
if (err != B_OK)
|
||||||
return err;
|
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,
|
archive->AddData("pts", B_POINT_TYPE, data->ptList, sizeof(BPoint), true,
|
||||||
data->ptCount);
|
data->ptCount);
|
||||||
|
|
||||||
for (int32 i = 1; i < data->ptCount; i++)
|
for (i = 1; i < data->ptCount; i++)
|
||||||
archive->AddPoint("pts", data->ptList[i]);
|
archive->AddPoint("pts", data->ptList[i]);
|
||||||
|
|
||||||
// Avoids allocation for each op
|
// Avoids allocation for each op
|
||||||
|
Loading…
Reference in New Issue
Block a user