From e1d7ae79b29588b2170bf1824e42e79b65b7edbf Mon Sep 17 00:00:00 2001 From: haydentech Date: Wed, 14 May 2003 15:24:36 +0000 Subject: [PATCH] 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 --- src/kits/interface/Shape.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/Shape.cpp b/src/kits/interface/Shape.cpp index 235beade73..e206605ad7 100644 --- a/src/kits/interface/Shape.cpp +++ b/src/kits/interface/Shape.cpp @@ -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