]> git.lyx.org Git - features.git/commitdiff
insets/InsetLine.cpp: use std::abs
authorLars Gullik Bjønnes <larsbj@gullik.org>
Fri, 26 Oct 2012 08:56:53 +0000 (10:56 +0200)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Fri, 26 Oct 2012 23:25:39 +0000 (01:25 +0200)
Use std::abs in stead of std::max(v, -v).

src/insets/InsetLine.cpp

index 86a7e5cd056c96e58c5c82caa4373f9984394a3c..f72fe646ab2d56bdea91652a25a63dc8f81ead59 100644 (file)
@@ -118,7 +118,7 @@ void InsetLine::metrics(MetricsInfo & mi, Dimension & dim) const
 
        // set a minimal width
        int const minw = (dim.wid < 0) ? 24 : 4;
-       dim.wid = max(minw, max(dim.wid, -dim.wid));
+       dim.wid = max(minw, abs(dim.wid));
 
        Length height = Length(to_ascii(getParam("height")));
        height_ = height.inPixels(max_width, fm.width(char_type('M')));