Fixed uninitialized-memory errors detected by Valgrind
This commit is contained in:
parent
44a3981fbf
commit
93145387f4
@ -61,7 +61,7 @@ void Group::GenerateLoops(void) {
|
||||
if(type == DRAWING_3D || type == DRAWING_WORKPLANE ||
|
||||
type == ROTATE || type == TRANSLATE || type == IMPORTED)
|
||||
{
|
||||
bool allClosed, allCoplanar, allNonZeroLen;
|
||||
bool allClosed = false, allCoplanar = false, allNonZeroLen = false;
|
||||
AssembleLoops(&allClosed, &allCoplanar, &allNonZeroLen);
|
||||
if(!allCoplanar) {
|
||||
polyError.how = POLY_NOT_COPLANAR;
|
||||
|
@ -299,10 +299,14 @@ void SEdgeList::CullExtraneousEdges(void) {
|
||||
// that would naively be O(n).
|
||||
//-----------------------------------------------------------------------------
|
||||
SKdNodeEdges *SKdNodeEdges::Alloc(void) {
|
||||
return (SKdNodeEdges *)AllocTemporary(sizeof(SKdNodeEdges));
|
||||
SKdNodeEdges *ne = (SKdNodeEdges *)AllocTemporary(sizeof(SKdNodeEdges));
|
||||
ZERO(ne);
|
||||
return ne;
|
||||
}
|
||||
SEdgeLl *SEdgeLl::Alloc(void) {
|
||||
return (SEdgeLl *)AllocTemporary(sizeof(SEdgeLl));
|
||||
SEdgeLl *sell = (SEdgeLl *)AllocTemporary(sizeof(SEdgeLl));
|
||||
ZERO(sell);
|
||||
return sell;
|
||||
}
|
||||
SKdNodeEdges *SKdNodeEdges::From(SEdgeList *sel) {
|
||||
SEdgeLl *sell = NULL;
|
||||
|
@ -61,7 +61,7 @@ bool GraphicsWindow::ToolbarMouseMoved(int x, int y) {
|
||||
x += ((int)width/2);
|
||||
y += ((int)height/2);
|
||||
|
||||
int nh;
|
||||
int nh = 0;
|
||||
bool withinToolbar = ToolbarDrawOrHitTest(x, y, false, &nh);
|
||||
if(!withinToolbar) nh = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user