summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-02-14 23:53:13 (GMT)
committerMarius Kintel <marius@kintel.net>2012-02-14 23:53:13 (GMT)
commit68a10954cf09104d4b0097b9a62ae30cd316a5c6 (patch)
tree1751423f8f8c013ebb759f927c0318f82a2427a4 /src
parent25f6593484951c32aaaf79da89d0b3acf352b0fe (diff)
parenta9e79409436d9037227dd73571b026c7ff0d4f62 (diff)
Merge branch 'clothbot-master'
Diffstat (limited to 'src')
-rw-r--r--src/PolySetCGALEvaluator.cc2
-rw-r--r--src/dxfdata.cc8
-rw-r--r--src/expr.cc4
-rw-r--r--src/primitives.cc2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/PolySetCGALEvaluator.cc b/src/PolySetCGALEvaluator.cc
index c1bdea4..81ae31e 100644
--- a/src/PolySetCGALEvaluator.cc
+++ b/src/PolySetCGALEvaluator.cc
@@ -108,7 +108,7 @@ PolySet *PolySetCGALEvaluator::evaluatePolySet(const ProjectionNode &node)
// in the XY plane, causing the resulting 2D polygon to be self-intersection
// and cause a crash in CGALEvaluator::PolyReducer. The right solution is to
// filter these polygons here. kintel 20120203.
- Grid2d<int> conversion_grid(GRID_COARSE);
+ Grid2d<unsigned int> conversion_grid(GRID_COARSE);
for (size_t i = 0; i < ps3->polygons.size(); i++) {
for (size_t j = 0; j < ps3->polygons[i].size(); j++) {
double x = ps3->polygons[i][j][0];
diff --git a/src/dxfdata.cc b/src/dxfdata.cc
index 52493ac..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
- 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];
diff --git a/src/expr.cc b/src/expr.cc
index 66a0d11..671553c 100644
--- a/src/expr.cc
+++ b/src/expr.cc
@@ -86,8 +86,8 @@ Value Expression::evaluate(const Context *context) const
return *v1.vec[i];
}
if (v1.type == Value::STRING && v2.type == Value::NUMBER) {
- int i = int(v2.num);
- if (i >= 0 && i < v1.text.size())
+ unsigned int i = int(v2.num);
+ if (i < v1.text.size())
return Value(v1.text.substr(i, 1));
}
return Value();
diff --git a/src/primitives.cc b/src/primitives.cc
index feaa1a4..ce52550 100644
--- a/src/primitives.cc
+++ b/src/primitives.cc
@@ -530,7 +530,7 @@ sphere_next_r2:
{
dd.paths.push_back(DxfData::Path());
for (size_t j=0; j<this->paths.vec[i]->vec.size(); j++) {
- int idx = this->paths.vec[i]->vec[j]->num;
+ unsigned int idx = this->paths.vec[i]->vec[j]->num;
if (idx < dd.points.size()) {
dd.paths.back().indices.push_back(idx);
}
contact: Jan Huwald // Impressum