[Bf-committers] Compiler error with MSVC6 on SG_Tree.cpp

Peter den Bak bf-committers@blender.org
Mon, 17 May 2004 22:56:04 +0200


Thanks Douglas,

I'm up and running again!

Peter


-----Original Message-----
From: bf-committers-admin@blender.org
[mailto:bf-committers-admin@blender.org] On Behalf Of Douglas Toltzman
Sent: Monday, May 17, 2004 10:46 PM
To: bf-committers@blender.org
Subject: RE: [Bf-committers] Compiler error with MSVC6 on SG_Tree.cpp

For these errors, you'll need to declare x and y one time and remove the
declarations in the for (...;...;...) constructs.

e.g.
Add a line at 271 that reads; "unsigned int x;"

Then inside the "for ( unsigned int x ..." remove the "unsigned int".
Repeat the "unsigned int" removal for the next "for ( unsigned int x..."
line a little further down.  What you are seeing is a scoping error.

I'm not sure where "y" is, but it's probably the same problem.

On Mon, 17 May 2004, Peter den Bak wrote:

> Thanks Douglas,
>=20
> It works, but this only leaves 2 errors.
>=20
> Compiling...
> SG_Tree.cpp
> =
F:\Develop\CVStree\blender\source\gameengine\SceneGraph\SG_Tree.cpp(283) =
:
> error C2374: 'x' : redefinition; multiple initialization
> =20
> =
F:\Develop\CVStree\blender\source\gameengine\SceneGraph\SG_Tree.cpp(272) =
:
> see declaration of 'x'
> =
F:\Develop\CVStree\blender\source\gameengine\SceneGraph\SG_Tree.cpp(288) =
:
> error C2374: 'y' : redefinition; multiple initialization
> =20
> =
F:\Develop\CVStree\blender\source\gameengine\SceneGraph\SG_Tree.cpp(246) =
:
> see declaration of 'y'
> Error executing cl.exe.
>=20
> blender.exe - 2 error(s), 0 warning(s)
>=20
> Here is the code, line 269-295:
>=20
> 		/* Remove other bboxes that contain the two bboxes */
> 		sizes.delete_column(miny);
> 	=09
> 		for( unsigned int x =3D miny + 1; x < num_objects; x++)
> 		{
> 			if (x =3D=3D minx)
> 				continue;
> 			delete sizes(x, miny);
> 		}
> 		sizes.erase_row(miny);
> 	=09
> 		num_objects--;
> 		minx--;
> 		sizes(minx, minx) =3D min;
> 		for( unsigned int x =3D minx + 1; x < num_objects; x++)
> 		{
> 			delete sizes(x, minx);
> 			sizes(x, minx) =3D new SG_Tree(min, sizes(x, x));
> 		}
> 		for( unsigned int y =3D 0; y < minx; y++)
> 		{
> 			delete sizes(minx, y);
> 			sizes(minx, y) =3D new SG_Tree(sizes(y, y), min);
> 		}
> 	}
> 	return sizes(1, 0);
> }
>=20
> I think I know how to solve this one :-) but perhaps its better the =
author
> of SG_Tree.cpp does a new commit with some fixes, making the CVStree =
MSVC6
> compliant again.
>=20
> Regards,
>=20
> Peter

_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
http://www.blender.org/mailman/listinfo/bf-committers