[Libreoffice-commits] core.git: vcl/source

Stephan Bergmann sbergman at redhat.com
Wed Nov 4 03:31:50 PST 2015


 vcl/source/filter/sgvspln.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ec60a59a710e1dd0f976770301df71653351d654
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Nov 4 12:30:38 2015 +0100

    -Werror,-Wabsolute-value
    
    ("using integer absolute value function 'abs' when argument is of floating point
    type; use function 'std::abs' instead")
    
    Change-Id: I3634186a10607f3b3fc6fc7c0aef968b32892156

diff --git a/vcl/source/filter/sgvspln.cxx b/vcl/source/filter/sgvspln.cxx
index 2a32875..dedd999 100644
--- a/vcl/source/filter/sgvspln.cxx
+++ b/vcl/source/filter/sgvspln.cxx
@@ -570,14 +570,14 @@ sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond,
             if (y[n]!=y[0]) return 4;
         } break;
         case 4: {
-            if (abs(Marg01)>=MAXROOT) {
+            if (std::abs(Marg01)>=MAXROOT) {
                 alphX=0.0;
                 alphY=std::copysign(1.0,y[1]-y[0]);
             } else {
                 alphX=std::copysign(sqrt(1.0/(1.0+Marg01*Marg01)),x[1]-x[0]);
                 alphY=alphX*Marg01;
             }
-            if (abs(MargN1)>=MAXROOT) {
+            if (std::abs(MargN1)>=MAXROOT) {
                 betX=0.0;
                 betY=std::copysign(1.0,y[n]-y[n-1]);
             } else {


More information about the Libreoffice-commits mailing list