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

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


Thanks Douglas,

It works, but this only leaves 2 errors.

Compiling...
SG_Tree.cpp
F:\Develop\CVStree\blender\source\gameengine\SceneGraph\SG_Tree.cpp(283) :
error C2374: 'x' : redefinition; multiple initialization
 
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
 
F:\Develop\CVStree\blender\source\gameengine\SceneGraph\SG_Tree.cpp(246) :
see declaration of 'y'
Error executing cl.exe.

blender.exe - 2 error(s), 0 warning(s)

Here is the code, line 269-295:

		/* Remove other bboxes that contain the two bboxes */
		sizes.delete_column(miny);
		
		for( unsigned int x = miny + 1; x < num_objects; x++)
		{
			if (x == minx)
				continue;
			delete sizes(x, miny);
		}
		sizes.erase_row(miny);
		
		num_objects--;
		minx--;
		sizes(minx, minx) = min;
		for( unsigned int x = minx + 1; x < num_objects; x++)
		{
			delete sizes(x, minx);
			sizes(x, minx) = new SG_Tree(min, sizes(x, x));
		}
		for( unsigned int y = 0; y < minx; y++)
		{
			delete sizes(minx, y);
			sizes(minx, y) = new SG_Tree(sizes(y, y), min);
		}
	}
	return sizes(1, 0);
}

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.

Regards,

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:12 PM
To: bf-committers@blender.org
Subject: Re: [Bf-committers] Compiler error with MSVC6 on SG_Tree.cpp

Try changing line 106 which reads;
SG_Tree *left(m_left), *right(m_right);

to;
SG_Tree *left = m_left, *right = m_right;

... the syntax should be equivalent.  If that doesn't work, then SG_Tree
must be an undefined type, or something.

Douglas Toltzman

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