From 5894efcfe59449ff83374ffce1ca68e5ef9e8d00 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 17 Mar 2015 18:01:49 +0300 Subject: [PATCH] Fix unresolved symbols in src/constraint.cpp when building libslvs. --- src/constraint.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/constraint.cpp b/src/constraint.cpp index dac581c4..b1290c9b 100644 --- a/src/constraint.cpp +++ b/src/constraint.cpp @@ -52,6 +52,8 @@ char *Constraint::DescriptionString(void) { return ret; } +#ifndef LIBRARY + //----------------------------------------------------------------------------- // Delete all constraints with the specified type, entityA, ptA. We use this // when auto-removing constraints that would become redundant. @@ -112,8 +114,6 @@ void Constraint::ConstrainCoincident(hEntity ptA, hEntity ptB) { Entity::NO_ENTITY, Entity::NO_ENTITY, false, false); } -#ifndef LIBRARY - void Constraint::MenuConstrain(int id) { Constraint c; ZERO(&c); @@ -351,7 +351,7 @@ void Constraint::MenuConstrain(int id) { c.entityA = gs.entity[0]; c.ptA = gs.point[0]; c.ptB = gs.point[1]; - } else if(gs.lineSegments == 1 && + } else if(gs.lineSegments == 1 && ((gs.workplanes == 1 && gs.n == 2) || (gs.n == 1))) { @@ -492,7 +492,7 @@ void Constraint::MenuConstrain(int id) { // normal vector; allow that, since the numerical // constraint does SWAP(Vector, ru, rv); - } + } fu = fu.Dot(ru) > 0 ? ru : ru.ScaledBy(-1); fv = fv.Dot(rv) > 0 ? rv : rv.ScaledBy(-1); @@ -550,7 +550,7 @@ void Constraint::MenuConstrain(int id) { return; } - Entity *ea = SK.GetEntity(c.entityA), + Entity *ea = SK.GetEntity(c.entityA), *eb = SK.GetEntity(c.entityB); if(ea->type == Entity::LINE_SEGMENT && eb->type == Entity::LINE_SEGMENT)