From 8570c37ed50597d85c3fced52ec2b97392dd1bfa Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 23 Jun 2011 09:26:27 +0000 Subject: [PATCH] From Ryan Pavlik, "I have successfully compiled OpenSceneGraph trunk using the Clang compiler (using a recent trunk build of llvm and clang, haven't tested an older release). The attached files contain the change shown in the diff below, which was required to finish the build with Clang. It fixes an issue with two-phase name lookup - there's more information here http://blog.llvm.org/2009/12/dreaded-two-phase-name-lookup.html " --- include/osg/Array | 4 ++-- include/osgAnimation/Interpolator | 10 +++++----- src/osgPlugins/lwo/lwo2parser.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/osg/Array b/include/osg/Array index 151edbdb1..19d7396c0 100644 --- a/include/osg/Array +++ b/include/osg/Array @@ -156,7 +156,7 @@ class TemplateArray : public Array, public MixinVector TemplateArray& operator = (const TemplateArray& array) { if (this==&array) return *this; - assign(array.begin(),array.end()); + this->assign(array.begin(),array.end()); return *this; } @@ -242,7 +242,7 @@ class TemplateIndexArray : public IndexArray, public MixinVector TemplateIndexArray& operator = (const TemplateIndexArray& array) { if (this==&array) return *this; - assign(array.begin(),array.end()); + this->assign(array.begin(),array.end()); return *this; } diff --git a/include/osgAnimation/Interpolator b/include/osgAnimation/Interpolator index aafbe2a50..b06575a50 100644 --- a/include/osgAnimation/Interpolator +++ b/include/osgAnimation/Interpolator @@ -84,7 +84,7 @@ namespace osgAnimation return; } - int i = getKeyIndexFromTime(keyframes,time); + int i = this->getKeyIndexFromTime(keyframes,time); result = keyframes[i].getValue(); } }; @@ -110,7 +110,7 @@ namespace osgAnimation return; } - int i = getKeyIndexFromTime(keyframes,time); + int i = this->getKeyIndexFromTime(keyframes,time); float blend = (time - keyframes[i].getTime()) / ( keyframes[i+1].getTime() - keyframes[i].getTime()); const TYPE& v1 = keyframes[i].getValue(); const TYPE& v2 = keyframes[i+1].getValue(); @@ -137,7 +137,7 @@ namespace osgAnimation return; } - int i = getKeyIndexFromTime(keyframes,time); + int i = this->getKeyIndexFromTime(keyframes,time); float blend = (time - keyframes[i].getTime()) / ( keyframes[i+1].getTime() - keyframes[i].getTime()); const TYPE& q1 = keyframes[i].getValue(); const TYPE& q2 = keyframes[i+1].getValue(); @@ -165,7 +165,7 @@ namespace osgAnimation return; } - int i = getKeyIndexFromTime(keyframes,time); + int i = this->getKeyIndexFromTime(keyframes,time); float blend = (time - keyframes[i].getTime()) / ( keyframes[i+1].getTime() - keyframes[i].getTime()); TYPE v1,v2; keyframes[i].getValue().uncompress(keyframes.mScale, keyframes.mMin, v1); @@ -196,7 +196,7 @@ namespace osgAnimation return; } - int i = getKeyIndexFromTime(keyframes,time); + int i = this->getKeyIndexFromTime(keyframes,time); float t = (time - keyframes[i].getTime()) / ( keyframes[i+1].getTime() - keyframes[i].getTime()); float one_minus_t = 1.0-t; diff --git a/src/osgPlugins/lwo/lwo2parser.h b/src/osgPlugins/lwo/lwo2parser.h index 6330dce44..cb2a5c6b9 100644 --- a/src/osgPlugins/lwo/lwo2parser.h +++ b/src/osgPlugins/lwo/lwo2parser.h @@ -69,7 +69,7 @@ namespace lwo2 throw parser_error("invalid file format"); } while (it < end) - chk->data.push_back(parse_chunk(it, "FORM")); + chk->data.push_back(this->parse_chunk(it, "FORM")); return chk; } }