From: tgdwyer Date: Fri, 14 Jul 2006 05:16:38 +0000 (+0000) Subject: fixed warnings X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d1c7cc7eb10f1bf5756d299e4a1e4f3060bfed8f;p=inkscape.git fixed warnings --- diff --git a/src/graphlayout/graphlayout.cpp b/src/graphlayout/graphlayout.cpp index 432f3c942..403145636 100644 --- a/src/graphlayout/graphlayout.cpp +++ b/src/graphlayout/graphlayout.cpp @@ -92,7 +92,6 @@ void graphlayout(GSList const *const items) { minX=min(ll[0],minX); minY=min(ll[1],minY); maxX=max(ur[0],maxX); maxY=max(ur[1],maxY); nodelookup[u->id]=rs.size(); - cout << "Node " << rs.size() << endl; rs.push_back(new Rectangle(ll[0],ur[0],ll[1],ur[1])); } @@ -106,12 +105,10 @@ void graphlayout(GSList const *const items) { "avoidoverlaplayout"); bool avoid_overlaps = false; bool directed = false; - if (directed_str && !strcmp(directed_str, "true")) { - cout << "Directed layout requested.\n"; + if (directed_str && !strcmp(directed_str, "true")) { directed = true; } - if (overlaps_str && !strcmp(overlaps_str, "true")) { - cout << "Avoid overlaps requested.\n"; + if (overlaps_str && !strcmp(overlaps_str, "true")) { avoid_overlaps = true; } @@ -143,11 +140,10 @@ void graphlayout(GSList const *const items) { map::iterator v_pair=nodelookup.find(iv->id); if(v_pair!=nodelookup.end()) { unsigned v=v_pair->second; - cout << "Edge: (" << u <<","<style->marker[SP_MARKER_LOC_END].set) { if(directed && strcmp(conn->style->marker[SP_MARKER_LOC_END].value,"none")) { - cout << conn->style->marker[SP_MARKER_LOC_END].value << endl; scy.push_back(new SimpleConstraint(v, u, (ideal_connector_length * directed_edge_height_modifier))); } @@ -158,8 +154,8 @@ void graphlayout(GSList const *const items) { g_slist_free(nlist); } } - double width=maxX-minX; - double height=maxY-minY; + //double width=maxX-minX; + //double height=maxY-minY; const unsigned E = es.size(); double eweights[E]; fill(eweights,eweights+E,1); diff --git a/src/libcola/conjugate_gradient.cpp b/src/libcola/conjugate_gradient.cpp index ed8ffbfed..67d15d6a0 100644 --- a/src/libcola/conjugate_gradient.cpp +++ b/src/libcola/conjugate_gradient.cpp @@ -35,9 +35,11 @@ matrix_times_vector(valarray const &matrix, /* m * n */ } } +/* static double Linfty(valarray const &vec) { return std::max(vec.max(), -vec.min()); } +*/ double inner(valarray const &x, diff --git a/src/libvpsc/remove_rectangle_overlap.cpp b/src/libvpsc/remove_rectangle_overlap.cpp index 78df24b22..68af4c5c5 100644 --- a/src/libvpsc/remove_rectangle_overlap.cpp +++ b/src/libvpsc/remove_rectangle_overlap.cpp @@ -41,19 +41,18 @@ double Rectangle::yBorder=0; * too much in the first pass. */ void removeRectangleOverlap(unsigned n, Rectangle *rs[], double xBorder, double yBorder) { - assert(0 <= n); try { // The extra gap avoids numerical imprecision problems Rectangle::setXBorder(xBorder+EXTRA_GAP); Rectangle::setYBorder(yBorder+EXTRA_GAP); Variable **vs=new Variable*[n]; - for(int i=0;idesiredPosition; } Solver vpsc_x(n,vs,m,cs); @@ -63,10 +62,10 @@ void removeRectangleOverlap(unsigned n, Rectangle *rs[], double xBorder, double f.close(); #endif vpsc_x.solve(); - for(int i=0;imoveCentreX(vs[i]->position()); } - for(int i = 0; i < m; ++i) { + for(unsigned i = 0; i < m; ++i) { delete cs[i]; } delete [] cs; @@ -81,12 +80,12 @@ void removeRectangleOverlap(unsigned n, Rectangle *rs[], double xBorder, double f.close(); #endif vpsc_y.solve(); - for(int i=0;imoveCentreY(vs[i]->position()); rs[i]->moveCentreX(oldX[i]); } delete [] oldX; - for(int i = 0; i < m; ++i) { + for(unsigned i = 0; i < m; ++i) { delete cs[i]; } delete [] cs; @@ -99,18 +98,18 @@ void removeRectangleOverlap(unsigned n, Rectangle *rs[], double xBorder, double f.close(); #endif vpsc_x2.solve(); - for(int i = 0; i < m; ++i) { + for(unsigned i = 0; i < m; ++i) { delete cs[i]; } delete [] cs; - for(int i=0;imoveCentreX(vs[i]->position()); delete vs[i]; } delete [] vs; } catch (char const *str) { std::cerr<