summaryrefslogtreecommitdiffstats
path: root/src/libcola/straightener.cpp
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-06-25 15:35:01 +0000
committerCampbell Barton <ideasman42@gmail.com>2011-06-25 15:35:01 +0000
commitdcf765f3dcbff2e65428e0f002bb5ea3648940f0 (patch)
tree307d762b00b7ef44a24b31cb434d00e46ede7140 /src/libcola/straightener.cpp
parentadded a Modules cmake dir, only use for find_package, reference cmake include... (diff)
downloadinkscape-dcf765f3dcbff2e65428e0f002bb5ea3648940f0.tar.gz
inkscape-dcf765f3dcbff2e65428e0f002bb5ea3648940f0.zip
warning cleanup (no functional changes)
- enclose && / || with brackets to avoid ambiguity. - don't cast from booleans to pointers. (bzr r10359)
Diffstat (limited to 'src/libcola/straightener.cpp')
-rw-r--r--src/libcola/straightener.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcola/straightener.cpp b/src/libcola/straightener.cpp
index e237c03c3..7c73cb9e9 100644
--- a/src/libcola/straightener.cpp
+++ b/src/libcola/straightener.cpp
@@ -108,7 +108,7 @@ namespace straightener {
int compare_events(const void *a, const void *b) {
Event *ea=*(Event**)a;
Event *eb=*(Event**)b;
- if(ea->v!=NULL&&ea->v==eb->v||ea->e!=NULL&&ea->e==eb->e) {
+ if((ea->v!=NULL&&ea->v==eb->v)||(ea->e!=NULL&&ea->e==eb->e)) {
// when comparing opening and closing from object
// open must come first
if(ea->type==Open) return -1;
@@ -263,8 +263,8 @@ namespace straightener {
// node is on an edge
Edge *edge=(*i)->edge;
if(!edge->isEnd(v->id)
- &&(l!=NULL&&!edge->isEnd(l->id)||l==NULL)
- &&(r!=NULL&&!edge->isEnd(r->id)||r==NULL)) {
+ &&((l!=NULL&&!edge->isEnd(l->id))||l==NULL)
+ &&((r!=NULL&&!edge->isEnd(r->id))||r==NULL)) {
if(lastNode!=NULL) {
//printf(" Rule A: Constraint: v%d +g <= v%d\n",lastNode->id,(*i)->id);
cs.push_back(createConstraint(lastNode,*i,dim));