diff options
| author | Campbell Barton <ideasman42@gmail.com> | 2011-06-25 15:35:01 +0000 |
|---|---|---|
| committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-25 15:35:01 +0000 |
| commit | dcf765f3dcbff2e65428e0f002bb5ea3648940f0 (patch) | |
| tree | 307d762b00b7ef44a24b31cb434d00e46ede7140 | |
| parent | added a Modules cmake dir, only use for find_package, reference cmake include... (diff) | |
| download | inkscape-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)
| -rw-r--r-- | src/connector-context.cpp | 22 | ||||
| -rw-r--r-- | src/extension/effect.cpp | 2 | ||||
| -rw-r--r-- | src/gradient-drag.cpp | 2 | ||||
| -rw-r--r-- | src/libavoid/vpsc.cpp | 2 | ||||
| -rw-r--r-- | src/libcola/straightener.cpp | 6 | ||||
| -rw-r--r-- | src/libcroco/cr-parser.c | 2 | ||||
| -rw-r--r-- | src/libvpsc/block.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/desktop-widget.h | 2 | ||||
| -rw-r--r-- | src/widgets/toolbox.cpp | 4 |
9 files changed, 22 insertions, 22 deletions
diff --git a/src/connector-context.cpp b/src/connector-context.cpp index 251b41066..2aa9c41ee 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -1306,12 +1306,12 @@ cc_connector_rerouting_finish(SPConnectorContext *const cc, Geom::Point *const p if (found) { if (cc->clickedhandle == cc->endpt_handle[0]) { - cc->clickeditem->setAttribute("inkscape:connection-start", shape_label, false); - cc->clickeditem->setAttribute("inkscape:connection-start-point", cpid, false); + cc->clickeditem->setAttribute("inkscape:connection-start", shape_label, NULL); + cc->clickeditem->setAttribute("inkscape:connection-start-point", cpid, NULL); } else { - cc->clickeditem->setAttribute("inkscape:connection-end", shape_label, false); - cc->clickeditem->setAttribute("inkscape:connection-end-point", cpid, false); + cc->clickeditem->setAttribute("inkscape:connection-end", shape_label, NULL); + cc->clickeditem->setAttribute("inkscape:connection-end-point", cpid, NULL); } g_free(shape_label); } @@ -1451,23 +1451,23 @@ spcc_flush_white(SPConnectorContext *cc, SPCurve *gc) bool connection = false; cc->newconn->setAttribute( "inkscape:connector-type", - cc->isOrthogonal ? "orthogonal" : "polyline", false ); + cc->isOrthogonal ? "orthogonal" : "polyline", NULL ); cc->newconn->setAttribute( "inkscape:connector-curvature", - Glib::Ascii::dtostr(cc->curvature).c_str(), false ); + Glib::Ascii::dtostr(cc->curvature).c_str(), NULL ); if (cc->shref) { - cc->newconn->setAttribute( "inkscape:connection-start", cc->shref, false); + cc->newconn->setAttribute( "inkscape:connection-start", cc->shref, NULL); if (cc->scpid) { - cc->newconn->setAttribute( "inkscape:connection-start-point", cc->scpid, false); + cc->newconn->setAttribute( "inkscape:connection-start-point", cc->scpid, NULL); } connection = true; } if (cc->ehref) { - cc->newconn->setAttribute( "inkscape:connection-end", cc->ehref, false); + cc->newconn->setAttribute( "inkscape:connection-end", cc->ehref, NULL); if (cc->ecpid) { - cc->newconn->setAttribute( "inkscape:connection-end-point", cc->ecpid, false); + cc->newconn->setAttribute( "inkscape:connection-end-point", cc->ecpid, NULL); } connection = true; } @@ -1950,7 +1950,7 @@ void cc_selection_set_avoid(bool const set_avoid) char const *value = (set_avoid) ? "true" : NULL; if (cc_item_is_shape(item)) { - item->setAttribute("inkscape:connector-avoid", value, false); + item->setAttribute("inkscape:connector-avoid", value, NULL); item->avoidRef->handleSettingChange(); changes++; } diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index 51aa42da6..e01eb760a 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -324,7 +324,7 @@ Effect::set_last_effect (Effect * in_effect) Inkscape::XML::Node * Effect::find_menu (Inkscape::XML::Node * menustruct, const gchar *name) { - if (menustruct == NULL) return false; + if (menustruct == NULL) return NULL; for (Inkscape::XML::Node * child = menustruct; child != NULL; child = child->next()) { diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp index 8f7effe43..142ae2a98 100644 --- a/src/gradient-drag.cpp +++ b/src/gradient-drag.cpp @@ -1962,7 +1962,7 @@ GrDrag::deleteSelected (bool just_one) { if (!selected) return; - SPDocument *document = false; + SPDocument *document = NULL; struct StructStopInfo { SPStop * spstop; diff --git a/src/libavoid/vpsc.cpp b/src/libavoid/vpsc.cpp index 19d360375..1646ddaaa 100644 --- a/src/libavoid/vpsc.cpp +++ b/src/libavoid/vpsc.cpp @@ -422,7 +422,7 @@ Constraint* IncSolver::mostViolated(Constraints &l) { // downwards. There is always at least 1 element in the // vector because of search. // TODO check this logic and add parens: - if((deletePoint != end) && ((minSlack < ZERO_UPPERBOUND) && !v->active || v->equality)) { + if((deletePoint != end) && (((minSlack < ZERO_UPPERBOUND) && !v->active) || v->equality)) { *deletePoint = l[l.size()-1]; l.resize(l.size()-1); } 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)); diff --git a/src/libcroco/cr-parser.c b/src/libcroco/cr-parser.c index 5b0a56f32..a8e2de5a3 100644 --- a/src/libcroco/cr-parser.c +++ b/src/libcroco/cr-parser.c @@ -2408,7 +2408,7 @@ cr_parser_parse_stylesheet (CRParser * a_this) import_string, NULL, &location) ; - if ((PRIVATE (a_this)->sac_handler->resolve_import == TRUE)) { + if (PRIVATE (a_this)->sac_handler->resolve_import == TRUE) { /* *TODO: resolve the *import rule. diff --git a/src/libvpsc/block.cpp b/src/libvpsc/block.cpp index 221df536a..0bd662f28 100644 --- a/src/libvpsc/block.cpp +++ b/src/libvpsc/block.cpp @@ -72,7 +72,7 @@ void Block::setUpConstraintHeap(PairingHeap<Constraint*>* &h,bool in) { for (Cit j=cs->begin();j!=cs->end();++j) { Constraint *c=*j; c->timeStamp=blockTimeCtr; - if (c->left->block != this && in || c->right->block != this && !in) { + if ((c->left->block != this && in) || (c->right->block != this && !in)) { h->insert(c); } } diff --git a/src/widgets/desktop-widget.h b/src/widgets/desktop-widget.h index fdf651287..79994a299 100644 --- a/src/widgets/desktop-widget.h +++ b/src/widgets/desktop-widget.h @@ -246,7 +246,7 @@ struct SPDesktopWidget { private: GtkWidget *tool_toolbox; GtkWidget *aux_toolbox; - GtkWidget *commands_toolbox,; + GtkWidget *commands_toolbox; GtkWidget *snap_toolbox; static void init(SPDesktopWidget *widget); diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index fb91bfb53..a5d81d9bf 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -8015,7 +8015,7 @@ static void sp_connector_orthogonal_toggled( GtkToggleAction* act, GObject *tbl if (cc_item_is_connector(item)) { item->setAttribute( "inkscape:connector-type", - value, false); + value, NULL); item->avoidRef->handleSettingChange(); modmade = true; } @@ -8064,7 +8064,7 @@ static void connector_curvature_changed(GtkAdjustment *adj, GObject* tbl) if (cc_item_is_connector(item)) { item->setAttribute( "inkscape:connector-curvature", - value, false); + value, NULL); item->avoidRef->handleSettingChange(); modmade = true; } |
