summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2008-07-04 04:31:36 +0000
committerjoncruz <joncruz@users.sourceforge.net>2008-07-04 04:31:36 +0000
commitcb8293cf876bc8bf9cbce2ddcab98373ec3f758f (patch)
tree9bf42fe5b77e1a1df6794ada3abb1749b9370fa1 /src
parentremove left-overs from making SPCurve a proper class with methods (diff)
downloadinkscape-cb8293cf876bc8bf9cbce2ddcab98373ec3f758f.tar.gz
inkscape-cb8293cf876bc8bf9cbce2ddcab98373ec3f758f.zip
Mask out dead code causing warning
(bzr r6141)
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;