Thanks Ryan, changes merged and submitted to svn/trunk and OSG-3.0 branch.

On Wed, Jun 22, 2011 at 9:28 PM, Ryan Pavlik <[email protected]> wrote:
> All,
> 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
> I presume a similar fix to 3.0 would also work - the git mirror doesn't yet
> have the 3.0 branch so I haven't tested or backported, but as you can see
> the change is pretty minimal.
> Ryan
> diff --git a/include/osg/Array b/include/osg/Array
> index 151edbd..19d7396 100644
> --- a/include/osg/Array
> +++ b/include/osg/Array
> @@ -156,7 +156,7 @@ class TemplateArray : public Array, public
> MixinVector<T>
>          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<T>
>          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 aafbe2a..b06575a 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 d567410..37683e1 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;
>   }
>   }
>
> --
> Ryan Pavlik
> HCI Graduate Student
> Virtual Reality Applications Center
> Iowa State University
>
> [email protected]
> http://academic.cleardefinition.com
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to