Commit b81401c8 authored by Jan Möbius's avatar Jan Möbius
Browse files

Bad abs usage

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@20174 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ae83098c
...@@ -527,7 +527,7 @@ ManipulatorNode::mapToCylinder(GLState& _state, ...@@ -527,7 +527,7 @@ ManipulatorNode::mapToCylinder(GLState& _state,
Vec3d vd = ((origin2 - origin) % direction); Vec3d vd = ((origin2 - origin) % direction);
_axis_hit = (normal | vd); _axis_hit = (normal | vd);
double orthodistance = fabsf( ( origin2 - origin ) | normal); double orthodistance = std::abs( ( origin2 - origin ) | normal);
// hit cylinder ? // hit cylinder ?
......
...@@ -370,7 +370,7 @@ updateFont() { ...@@ -370,7 +370,7 @@ updateFont() {
// since metric.maxWidth() returns 0 for Mac we calculate it here // since metric.maxWidth() returns 0 for Mac we calculate it here
QFontMetricsF metric(qfont_); QFontMetricsF metric(qfont_);
for (char c = ' '; c < '~'; ++c) { for (char c = ' '; c < '~'; ++c) {
qreal width = metric.width(c) + abs(metric.leftBearing(c)) + abs(metric.rightBearing(c)); qreal width = metric.width(c) + std::abs(metric.leftBearing(c)) + std::abs(metric.rightBearing(c));
if (width > maxFontWidth_) if (width > maxFontWidth_)
maxFontWidth_ = width; maxFontWidth_ = width;
} }
...@@ -454,8 +454,8 @@ updateVBO() { ...@@ -454,8 +454,8 @@ updateVBO() {
lastCharRight = right; lastCharRight = right;
// left and right texture coordinates // left and right texture coordinates
qreal leftBearing = abs(metric.leftBearing(text_[i])); qreal leftBearing = std::abs(metric.leftBearing(text_[i]));
qreal rightBearing = abs(metric.rightBearing(text_[i])); qreal rightBearing = std::abs(metric.rightBearing(text_[i]));
qreal metricWidth = metric.width(text_[i]); qreal metricWidth = metric.width(text_[i]);
#ifdef WIN32 #ifdef WIN32
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment