summaryrefslogtreecommitdiff
path: root/src/dxfdata.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-02-14 23:13:07 (GMT)
committerMarius Kintel <marius@kintel.net>2012-02-14 23:13:07 (GMT)
commit8a5f6a4abde265bf7d9316d5aa5437b4eca24866 (patch)
tree81af82ba0fe3ab56b4c8ab707d38a64844944a51 /src/dxfdata.cc
parenta2109992e16246b4d72b316416b9e4bf0d75a288 (diff)
Minor unsigned fixes
Diffstat (limited to 'src/dxfdata.cc')
-rw-r--r--src/dxfdata.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dxfdata.cc b/src/dxfdata.cc
index 65996d9..2b84f7e 100644
--- a/src/dxfdata.cc
+++ b/src/dxfdata.cc
@@ -518,7 +518,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];
@@ -526,9 +526,9 @@ void DxfData::fixup_path_direction()
}
}
// rotate points if the path is in non-standard rotation
- unsigned int b = min_x_point;
- unsigned int a = b == 0 ? this->paths[i].indices.size() - 2 : b - 1;
- unsigned 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];
contact: Jan Huwald // Impressum