You can insert an explicit cast to unsigned int if you really need to
remove the warning. If an int is defined as 32 bit in your 64 bit
system you are safe as long as you keep number of children for one
group node less than 4 194 304..
The alternative would of course be to change the return type of
Group::getNumChildren to vector::size_type which I believe is defined
as size_t and is probably a 64 bit long long integer but I am quite
sure you will have many more warnings to remove if you try this.
/Jakob Ruhe
2008/8/7 Andy Skinner <[EMAIL PROTECTED]>:
> This method returns an unsigned int. It calls size() on the vector, which
> returns size_type.
>
> In our builds of software using OSG, we're getting warnings about a
> conversion of a 64 bit value to unsigned int.
>
> Has the OSG project had to change the type of common methods like this? Does
> it go well? I haven't had time to do any compiling of OSG for a long time
> (since we got 2.4.0 built and integrated). In this case, I'm adding a new
> file that gives this warning, and we've got structure in place to make it
> difficult to add files with warnings in compilation.
>
> I don't think it is likely to be a problem. One possibility is to cast it in
> the method. Is that what should be done?
>
> thanks
> andy
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org