diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-06-14 15:01:19 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-06-14 15:01:19 +0000 |
| commit | 4289e1281e707090b4195dcb879cf1532d9ef03a (patch) | |
| tree | 6128d36f89e544e0670a6197f91715dd99e92391 /src/2geom/poly.cpp | |
| parent | fixed another typo (diff) | |
| download | inkscape-4289e1281e707090b4195dcb879cf1532d9ef03a.tar.gz inkscape-4289e1281e707090b4195dcb879cf1532d9ef03a.zip | |
update 2geom
(bzr r5931)
Diffstat (limited to 'src/2geom/poly.cpp')
| -rw-r--r-- | src/2geom/poly.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/2geom/poly.cpp b/src/2geom/poly.cpp index 4f5ba6c55..27f98596b 100644 --- a/src/2geom/poly.cpp +++ b/src/2geom/poly.cpp @@ -45,7 +45,7 @@ std::vector<std::complex<double> > solve(Poly const & pp) { gsl_complex_packed_ptr z = new double[p.degree()*2]; double* a = new double[p.size()]; - for(int i = 0; i < p.size(); i++) + for(unsigned int i = 0; i < p.size(); i++) a[i] = p[i]; std::vector<std::complex<double> > roots; //roots.resize(p.degree()); @@ -55,7 +55,7 @@ std::vector<std::complex<double> > solve(Poly const & pp) { gsl_poly_complex_workspace_free (w); - for (int i = 0; i < p.degree(); i++) { + for (unsigned int i = 0; i < p.degree(); i++) { roots.push_back(std::complex<double> (z[2*i] ,z[2*i+1])); //printf ("z%d = %+.18f %+.18f\n", i, z[2*i], z[2*i+1]); } @@ -67,7 +67,7 @@ std::vector<double > solve_reals(Poly const & p) { std::vector<std::complex<double> > roots = solve(p); std::vector<double> real_roots; - for(int i = 0; i < roots.size(); i++) { + for(unsigned int i = 0; i < roots.size(); i++) { if(roots[i].imag() == 0) // should be more lenient perhaps real_roots.push_back(roots[i].real()); } |
