From f0a044ee77024866a4957f3b5377be3f59559ffe Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 28 Jan 2009 11:59:06 +0000 Subject: [PATCH] From Mathias Froehlich, "I have today built svn trunk on HP-UX and Solaris8. I had to do two small changes to src/osgWidget/Input.cpp and src/osgAnimation/Animation.cpp mainly because of name lookup problems. " --- src/osgAnimation/Animation.cpp | 4 ++-- src/osgWidget/Input.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osgAnimation/Animation.cpp b/src/osgAnimation/Animation.cpp index 2f30a7794..5ac0c9ea4 100644 --- a/src/osgAnimation/Animation.cpp +++ b/src/osgAnimation/Animation.cpp @@ -112,7 +112,7 @@ bool Animation::update (float time) if (!_duration) t = _startTime; else if (t > _duration) - t = fmodf(t, _duration); + t = fmod(t, (float)_duration); // std::cout << "t " << t << " duration " << _duration << std::endl; break; case PPONG: @@ -121,7 +121,7 @@ bool Animation::update (float time) else { int tt = (int) (t / _duration); - t = fmodf(t, _duration); + t = fmod(t, (float)_duration); if (tt%2) t = _duration - t; } diff --git a/src/osgWidget/Input.cpp b/src/osgWidget/Input.cpp index ceb62d6c4..bdda2f48c 100644 --- a/src/osgWidget/Input.cpp +++ b/src/osgWidget/Input.cpp @@ -175,7 +175,7 @@ unsigned int Input::calculateBestYOffset(const std::string& s) { for(osgText::String::iterator i = utf.begin(); i != utf.end(); i++) { osgText::Font* font = const_cast(_text->getFont()); osgText::Font::Glyph* glyph = font->getGlyph(fr, *i); - unsigned int d = abs(glyph->getHorizontalBearing().y()); + unsigned int d = abs((int)glyph->getHorizontalBearing().y()); if(d > descent) descent = d; }