diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2012-05-28 16:48:46 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2012-05-28 16:48:46 (GMT) |
commit | dd2002a81673b3875ce8c4e8a61cb10278c4eb03 (patch) | |
tree | 7aaadf1c9b12cd37a7a913d3e76256f6406fa939 /src/dxfdata.cc | |
parent | 4381762f5aa2e6a56258618e585e1510ead88684 (diff) | |
parent | 67eb2ebe90447e966dc1e08b91c43d937c521583 (diff) |
Tidy up code. Generate proper test png images. Merge branch 'master' into caliston1.
Conflicts:
src/PolySetCGALEvaluator.cc
Diffstat (limited to 'src/dxfdata.cc')
-rw-r--r-- | src/dxfdata.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dxfdata.cc b/src/dxfdata.cc index 20fcc71..00b246f 100644 --- a/src/dxfdata.cc +++ b/src/dxfdata.cc @@ -519,7 +519,7 @@ void DxfData::fixup_path_direction() break; this->paths[i].is_inner = true; double min_x = this->points[this->paths[i].indices[0]][0]; - int min_x_point = 0; + size_t min_x_point = 0; for (size_t j = 1; j < this->paths[i].indices.size(); j++) { if (this->points[this->paths[i].indices[j]][0] < min_x) { min_x = this->points[this->paths[i].indices[j]][0]; @@ -527,9 +527,9 @@ void DxfData::fixup_path_direction() } } // rotate points if the path is in non-standard rotation - int b = min_x_point; - int a = b == 0 ? this->paths[i].indices.size() - 2 : b - 1; - int c = b == this->paths[i].indices.size() - 1 ? 1 : b + 1; + size_t b = min_x_point; + size_t a = b == 0 ? this->paths[i].indices.size() - 2 : b - 1; + size_t c = b == this->paths[i].indices.size() - 1 ? 1 : b + 1; double ax = this->points[this->paths[i].indices[a]][0] - this->points[this->paths[i].indices[b]][0]; double ay = this->points[this->paths[i].indices[a]][1] - this->points[this->paths[i].indices[b]][1]; double cx = this->points[this->paths[i].indices[c]][0] - this->points[this->paths[i].indices[b]][0]; |