Code

Fix some compile warnings
authorcilix42 <cilix42@users.sourceforge.net>
Sun, 25 May 2008 14:06:41 +0000 (14:06 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Sun, 25 May 2008 14:06:41 +0000 (14:06 +0000)
src/live_effects/lpe-patternalongpath.cpp

index 9ab085d54805cc4aa0f2421c9a326e04174a20b3..85de609fbf3421a29e525ec4c24147d9710dc132 100644 (file)
@@ -144,7 +144,7 @@ LPEPatternAlongPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > con
         double scaling = 1;
         switch(type) {
             case PAPCT_REPEATED:
-                nbCopies = floor((uskeleton.domain().extent() - toffset + xspace)/(pattBndsX.extent()+xspace));
+                nbCopies = static_cast<int>(floor((uskeleton.domain().extent() - toffset + xspace)/(pattBndsX.extent()+xspace)));
                 pattBndsX = Interval(pattBndsX.min(),pattBndsX.max()+xspace);
                 break;
                 
@@ -160,12 +160,12 @@ LPEPatternAlongPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > con
             case PAPCT_REPEATED_STRETCHED:
                 // if uskeleton is closed:
                 if(path_i.segs.front().at0() == path_i.segs.back().at1()){
-                    nbCopies = std::floor((uskeleton.domain().extent() - toffset)/(pattBndsX.extent()+xspace));
+                    nbCopies = static_cast<int>(std::floor((uskeleton.domain().extent() - toffset)/(pattBndsX.extent()+xspace)));
                     pattBndsX = Interval(pattBndsX.min(),pattBndsX.max()+xspace);
                     scaling = (uskeleton.domain().extent() - toffset)/(((double)nbCopies)*pattBndsX.extent());
                     // if not closed: no space at the end
                 }else{
-                    nbCopies = std::floor((uskeleton.domain().extent() - toffset + xspace)/(pattBndsX.extent()+xspace));
+                    nbCopies = static_cast<int>(std::floor((uskeleton.domain().extent() - toffset + xspace)/(pattBndsX.extent()+xspace)));
                     pattBndsX = Interval(pattBndsX.min(),pattBndsX.max()+xspace);
                     scaling = (uskeleton.domain().extent() - toffset)/(((double)nbCopies)*pattBndsX.extent() - xspace);
                 }