Hello Thiago,
Thiago Bastos wrote:
> I've compiled a list of the warnings we were getting in our application
> (MSVC8 on Win32) that were caused by OSG2.
> I'm providing a simple patch for three of them, plus some comments.
many thanks for looking into these and sending the patch. I have a small
request for future patches though: could you do them in the source tree
instead of the installed headers? That would allow me to just apply them
to the sources and get the changes you made instead of recreating them
in the source tree. Also for your own work you probably don't want to
patch the installed headers because they don't match what was used to
build your libraries - which can lead to nasy surprises ;)
[SNIP]
> #Unfixed1
> >OSGTextFaceFactory.h(183) : warning C4231: nonstandard extension used
> : 'extern' before template explicit instantiation
> I noticed OSG_SYSTEM_EXPIMP_TMPL is set to 'extern' (on win32) in
> OSGSystemDef.h. At least at the line above, it's not necessary. Is
> 'extern' really necessary somewhere? IIRC it's only needed if you're
> building a static lib, template stuff is always inlined so the extern is
> not needed.
hm, I'm not sure about this one. Gerrit, do you remember the details of
how this is solved elsewhere?
> #Unfixed2
> >OSGGeoIntegralProperty.h(78) : warning C4244: 'return' : conversion
> from 'OSG::GeoIntegralProperty::MaxTypeT' to 'OSG::UInt32', possible
> loss of data
> >OSGGeoIntegralProperty.inl(52) : see reference to function template
> instantiation 'ExternalType
> OSG::GeoIntegralProperty::getValue<OSG::UInt32>(const OSG::UInt32)
> const' being compiled
>
> Yes, this is a stupid warning, but removing the const from the function
> parameter would do no harm. Again I didn't fix this, it's up to you.
if I'm reading this correctly it is not about he const OSG::UInt32
argument, but about the conversion from MaxTypeT (UInt64) to the
requested type (ExternalType = UInt32 in this case). I put a static_cast
in there, that should silence it.
Thanks again for the patch!
Cheers,
Carsten
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core