diff options
| -rw-r--r-- | src/desktop-events.cpp | 4 | ||||
| -rw-r--r-- | src/extension/internal/emf-inout.cpp | 4 | ||||
| -rw-r--r-- | src/extension/internal/emf-print.cpp | 2 | ||||
| -rw-r--r-- | src/extension/internal/wmf-inout.cpp | 4 | ||||
| -rw-r--r-- | src/extension/internal/wmf-print.cpp | 2 | ||||
| -rw-r--r-- | src/ui/tools/pen-tool.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/ruler.cpp | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp index 4023ad071..8be5e001b 100644 --- a/src/desktop-events.cpp +++ b/src/desktop-events.cpp @@ -365,7 +365,7 @@ gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data) if (event->motion.state & GDK_CONTROL_MASK) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); unsigned const snaps = abs(prefs->getInt("/options/rotationsnapsperpi/value", 12)); - bool const relative_snaps = abs(prefs->getBool("/options/relativeguiderotationsnap/value", false)); + bool const relative_snaps = prefs->getBool("/options/relativeguiderotationsnap/value", false); if (snaps) { if (relative_snaps) { Geom::Angle orig_angle(guide->normal_to_line); @@ -442,7 +442,7 @@ gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data) if (event->motion.state & GDK_CONTROL_MASK) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); unsigned const snaps = abs(prefs->getInt("/options/rotationsnapsperpi/value", 12)); - bool const relative_snaps = abs(prefs->getBool("/options/relativeguiderotationsnap/value", false)); + bool const relative_snaps = prefs->getBool("/options/relativeguiderotationsnap/value", false); if (snaps) { if (relative_snaps) { Geom::Angle orig_angle(guide->normal_to_line); diff --git a/src/extension/internal/emf-inout.cpp b/src/extension/internal/emf-inout.cpp index 863d1e006..257994560 100644 --- a/src/extension/internal/emf-inout.cpp +++ b/src/extension/internal/emf-inout.cpp @@ -2524,8 +2524,8 @@ std::cout << "BEFORE DRAW" double cx = pix_to_x_point( d, (rclBox.left + rclBox.right)/2.0, (rclBox.bottom + rclBox.top)/2.0 ); double cy = pix_to_y_point( d, (rclBox.left + rclBox.right)/2.0, (rclBox.bottom + rclBox.top)/2.0 ); - double rx = pix_to_abs_size( d, fabs(rclBox.right - rclBox.left )/2.0 ); - double ry = pix_to_abs_size( d, fabs(rclBox.top - rclBox.bottom)/2.0 ); + double rx = pix_to_abs_size( d, std::abs(rclBox.right - rclBox.left )/2.0 ); + double ry = pix_to_abs_size( d, std::abs(rclBox.top - rclBox.bottom)/2.0 ); SVGOStringStream tmp_ellipse; tmp_ellipse << "cx=\"" << cx << "\" "; diff --git a/src/extension/internal/emf-print.cpp b/src/extension/internal/emf-print.cpp index 0bdfd45b9..e054829b5 100644 --- a/src/extension/internal/emf-print.cpp +++ b/src/extension/internal/emf-print.cpp @@ -1882,7 +1882,7 @@ unsigned int PrintEmf::text(Inkscape::Extension::Print * /*mod*/, char const *te fix90n = 1; //assume vertical rot = (double)(((int) round(rot)) - irem); rotb = rot * M_PI / 1800.0; - if (abs(rot) == 900.0) { + if (std::abs(rot) == 900.0) { fix90n = 2; } } diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp index 2b05c6d2c..beb6190d3 100644 --- a/src/extension/internal/wmf-inout.cpp +++ b/src/extension/internal/wmf-inout.cpp @@ -2053,8 +2053,8 @@ std::cout << "BEFORE DRAW" double cx = pix_to_x_point( d, (rc.left + rc.right)/2.0, (rc.bottom + rc.top)/2.0 ); double cy = pix_to_y_point( d, (rc.left + rc.right)/2.0, (rc.bottom + rc.top)/2.0 ); - double rx = pix_to_abs_size( d, fabs(rc.right - rc.left )/2.0 ); - double ry = pix_to_abs_size( d, fabs(rc.top - rc.bottom)/2.0 ); + double rx = pix_to_abs_size( d, std::abs(rc.right - rc.left )/2.0 ); + double ry = pix_to_abs_size( d, std::abs(rc.top - rc.bottom)/2.0 ); SVGOStringStream tmp_ellipse; tmp_ellipse << "cx=\"" << cx << "\" "; diff --git a/src/extension/internal/wmf-print.cpp b/src/extension/internal/wmf-print.cpp index 55ad5da5f..e5ff34009 100644 --- a/src/extension/internal/wmf-print.cpp +++ b/src/extension/internal/wmf-print.cpp @@ -1396,7 +1396,7 @@ unsigned int PrintWmf::text(Inkscape::Extension::Print * /*mod*/, char const *te fix90n = 1; //assume vertical rot = (double)(((int) round(rot)) - irem); rotb = rot * M_PI / 1800.0; - if (abs(rot) == 900.0) { + if (std::abs(rot) == 900.0) { fix90n = 2; } } diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp index 70cbcaf0d..649c64034 100644 --- a/src/ui/tools/pen-tool.cpp +++ b/src/ui/tools/pen-tool.cpp @@ -1185,7 +1185,7 @@ void PenTool::_setSubsequentPoint(Geom::Point const p, bool statusbar, guint sta // we are drawing horizontal/vertical lines and hit an anchor; Geom::Point const origin = this->p[0]; // if the previous point and the anchor are not aligned either horizontally or vertically... - if ((abs(p[Geom::X] - origin[Geom::X]) > 1e-9) && (abs(p[Geom::Y] - origin[Geom::Y]) > 1e-9)) { + if ((std::abs(p[Geom::X] - origin[Geom::X]) > 1e-9) && (std::abs(p[Geom::Y] - origin[Geom::Y]) > 1e-9)) { // ...then we should draw an L-shaped path, consisting of two paraxial segments Geom::Point intermed = p; this->_setToNearestHorizVert(intermed, status, false); diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp index 5d5151343..8e818843d 100644 --- a/src/widgets/ruler.cpp +++ b/src/widgets/ruler.cpp @@ -1394,7 +1394,7 @@ sp_ruler_draw_ticks (SPRuler *ruler) (label_spacing_px > 6*digit_height || tick_index%2 == 0 || cur == 0) && (label_spacing_px > 3*digit_height || tick_index%4 == 0 || cur == 0)) { - if (fabs((int)cur) >= 2000 && (((int) cur)/1000)*1000 == ((int) cur)) + if (std::abs((int)cur) >= 2000 && (((int) cur)/1000)*1000 == ((int) cur)) sprintf (unit_str, "%dk", ((int) cur)/1000); else sprintf (unit_str, "%d", (int) cur); |
