diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-04-01 20:30:31 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-04-02 20:10:02 +0000 |
| commit | aea9a4ef6bee5b259118ceed660349e30dfdc285 (patch) | |
| tree | f5c94480142513ab675cd662e5df77b355dec381 /src/ui | |
| parent | Replace IS_FINITE with std::isfinite (exists since C++11) (diff) | |
| download | inkscape-aea9a4ef6bee5b259118ceed660349e30dfdc285.tar.gz inkscape-aea9a4ef6bee5b259118ceed660349e30dfdc285.zip | |
Replace IS_NAN with std::isnan (exists since C++11)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/toolbar/star-toolbar.cpp | 2 | ||||
| -rw-r--r-- | src/ui/tools/calligraphic-tool.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/toolbar/star-toolbar.cpp b/src/ui/toolbar/star-toolbar.cpp index 5135f06ee..d269fe431 100644 --- a/src/ui/toolbar/star-toolbar.cpp +++ b/src/ui/toolbar/star-toolbar.cpp @@ -295,7 +295,7 @@ void StarToolbar::proportion_value_changed() { if (DocumentUndo::getUndoSensitive(_desktop->getDocument())) { - if (!IS_NAN(_spoke_adj->get_value())) { + if (!std::isnan(_spoke_adj->get_value())) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); prefs->setDouble("/tools/shapes/star/proportion", _spoke_adj->get_value()); diff --git a/src/ui/tools/calligraphic-tool.cpp b/src/ui/tools/calligraphic-tool.cpp index ffe1ca46c..37a4a24f0 100644 --- a/src/ui/tools/calligraphic-tool.cpp +++ b/src/ui/tools/calligraphic-tool.cpp @@ -623,7 +623,7 @@ bool CalligraphicTool::root_handler(GdkEvent* event) { // so _gradually_ let go attraction to prevent jerks target = (this->hatch_spacing * speed + hatch_dist * (SPEED_NORMAL - speed))/SPEED_NORMAL; } - if (!IS_NAN(dot) && dot < -0.5) {// flip + if (!std::isnan(dot) && dot < -0.5) {// flip target = -target; } @@ -708,7 +708,7 @@ bool CalligraphicTool::root_handler(GdkEvent* event) { } else { // Not drawing but spacing set: gray, center snapped, fixed radius Geom::Point c = (nearest + this->hatch_spacing * hatch_unit_vector) * motion_to_curve.inverse(); - if (!IS_NAN(c[Geom::X]) && !IS_NAN(c[Geom::Y])) { + if (!std::isnan(c[Geom::X]) && !std::isnan(c[Geom::Y])) { Geom::Affine const sm (Geom::Scale(this->hatch_spacing, this->hatch_spacing) * Geom::Translate(c)); sp_canvas_item_affine_absolute(this->hatch_area, sm); sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(this->hatch_area), 0x7f7f7fff, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT); |
