summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/2geom/poly.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/2geom/poly.h b/src/2geom/poly.h
index 2af24d25f..f76bc3eee 100644
--- a/src/2geom/poly.h
+++ b/src/2geom/poly.h
@@ -93,26 +93,28 @@ public:
return result;
}
// equivalent to multiply by x^terms, discard negative terms
- Poly shifted(unsigned terms) const {
+ Poly shifted(unsigned terms) const {
Poly result;
// This was a no-op and breaks the build on x86_64, as it's trying
// to take maximum of 32-bit and 64-bit integers
//const unsigned out_size = std::max(unsigned(0), size()+terms);
const size_type out_size = size() + terms;
result.reserve(out_size);
-
- if(terms < 0) {
- for(unsigned i = 0; i < out_size; i++) {
- result.push_back((*this)[i-terms]);
- }
- } else {
+
+// By definition an unsigned can not be less than zero
+// TODO someone who understands the intent needs to correct this properly
+// if(terms < 0) {
+// for(unsigned i = 0; i < out_size; i++) {
+// result.push_back((*this)[i-terms]);
+// }
+// } else {
for(unsigned i = 0; i < terms; i++) {
result.push_back(0.0);
}
for(unsigned i = 0; i < size(); i++) {
result.push_back((*this)[i]);
}
- }
+// }
assert(result.size() == out_size);
return result;