summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e5c471)
raw | patch | inline | side by side (parent: 1e5c471)
author | joncruz <joncruz@users.sourceforge.net> | |
Fri, 4 Jul 2008 04:31:36 +0000 (04:31 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Fri, 4 Jul 2008 04:31:36 +0000 (04:31 +0000) |
src/2geom/poly.h | patch | blob | history |
diff --git a/src/2geom/poly.h b/src/2geom/poly.h
index 2af24d25fe14c1b96653545e207db44942d5cd54..f76bc3eeee8b8a43c60850d6113cb5509e614419 100644 (file)
--- a/src/2geom/poly.h
+++ b/src/2geom/poly.h
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;