# HG changeset patch # User Teemu Piippo # Date 1522409451 -10800 # Node ID f6a3640b18182ea6aaaa1a04070009fa1654895a # Parent 48374309f3d19f943ad10f7e80c7d08dae49445b fix warnings diff -r 48374309f3d1 -r f6a3640b1818 src/basics.cpp --- a/src/basics.cpp Thu Mar 29 10:42:45 2018 +0300 +++ b/src/basics.cpp Fri Mar 30 14:30:51 2018 +0300 @@ -57,11 +57,13 @@ double roundToDecimals(double value, int decimals) { + decimals = max(0, decimals); + if (decimals == 0) { return round(value); } - else if (decimals > 0) + else { qreal coefficient = pow(10, decimals); return round(value * coefficient) / coefficient; diff -r 48374309f3d1 -r f6a3640b1818 src/primitives.cpp --- a/src/primitives.cpp Thu Mar 29 10:42:45 2018 +0300 +++ b/src/primitives.cpp Fri Mar 30 14:30:51 2018 +0300 @@ -418,6 +418,9 @@ segment->setVertex(type == Disc ? 2 : 0, v2); } break; + + case Cylinder: + break; } }