Hi Amos Tim,
I've just checked in the change to use const operators in functors in
SharedStateManager, prompted by email on the same topic from Paul
Martz, this change looks the same as Tim's and is now checked in.
Robert.
On Dec 12, 2007 5:15 AM, Amos Smith [EMAIL PROTECTED] wrote:
With code downloaded via svn this evening (revision 7671), I'm seeing a
compilation error for osgDB SharedStateManager.cpp in Win32 Release mode.
Excerpt of error description:
C3848: expression having type 'const
osgDB::SharedStateManager::CompareStateAttributes' would lose some
const-volatile qualifiers in order to call 'bool
osgDB::SharedStateManager::CompareStateAttributes::operator ()(const
osg::ref_ptrT ,const osg::ref_ptrT )'
Build environment is: WinXP SP2, MS VS 8.1 SP1, using Microsoft Platform SDK
for Windows Server 2003 R2.
Full output for osgDB rebuild follows:
1-- Rebuild All started: Project: osgDB, Configuration: Release Win32
--
1Deleting intermediate and output files for project 'osgDB', configuration
'Release|Win32'
1Building Custom Rule E:/OpenSceneGraph/src/osgDB/CMakeLists.txt
1-- searching TIFF --tiff.hE:/3rdparty--
1-- searching FREETYPE --ft2build.hE:/3rdparty--
1-- searching JPEG --jpeglib.hE:/3rdparty--
1-- searching GLUT --GL/glut.hE:/3rdparty--
1-- searching GIFLIB --gif_lib.hE:/3rdparty--
1-- searching ZLIB --zlib.hE:/3rdparty--
1-- searching PNG --png.hE:/3rdparty--
1-- ERROR: wxWidgets was not found.
1-- Found JPEG: E:/3rdParty/lib/libjpeg.lib
1-- Found PNG: E:/3rdParty/lib/libpng.lib
1-- Configuring done
1-- Generating done
1-- Build files have been written to: E:/OpenSceneGraph
1Compiling...
1WriteFile.cpp
1E:\OpenSceneGraph\include\osgDB/DatabasePager(337) : warning C4800:
'osg::Texture::TextureObject *' : forcing value to bool 'true' or 'false'
(performance warning)
1Version.cpp
1SharedStateManager.cpp
1C:\Program Files\Microsoft Visual Studio 8\VC\include\xtree(1174) : error
C3848: expression having type 'const
osgDB::SharedStateManager::CompareStateAttributes' would lose some
const-volatile qualifiers in order to call 'bool
osgDB::SharedStateManager::CompareStateAttributes::operator ()(const
osg::ref_ptrT ,const osg::ref_ptrT )'
1with
1[
1T=osg::StateAttribute
1]
1C:\Program Files\Microsoft Visual Studio 8\VC\include\xtree(1169)
: while compiling class template member function
'std::_Tree_nod_Traits::_Node *std::_Tree_Traits::_Lbound(const
osg::ref_ptrT ) const'
1with
1[
1
_Traits=std::_Tset_traitsosg::ref_ptrosg::StateAttribute,osgDB::SharedStateManager::CompareStateAttributes,std::allocatorosg::ref_ptrosg::StateAttribute,false,
1T=osg::StateAttribute
1]
1C:\Program Files\Microsoft Visual Studio 8\VC\include\set(69) :
see reference to class template instantiation 'std::_Tree_Traits' being
compiled
1with
1[
1
_Traits=std::_Tset_traitsosg::ref_ptrosg::StateAttribute,osgDB::SharedStateManager::CompareStateAttributes,std::allocatorosg::ref_ptrosg::StateAttribute,false
1]
1E:\OpenSceneGraph\include\osgDB/SharedStateManager(88) : see
reference to class template instantiation 'std::set_Kty,_Pr' being
compiled
1with
1[
1_Kty=osg::ref_ptrosg::StateAttribute,
1_Pr=osgDB::SharedStateManager::CompareStateAttributes
1]
1Registry.cpp
1E:\OpenSceneGraph\include\osgDB/DatabasePager(337) : warning C4800:
'osg::Texture::TextureObject *' : forcing value to bool 'true' or 'false'
(performance warning)
1ReaderWriter.cpp
1E:\OpenSceneGraph\include\osgDB/DatabasePager(337) : warning C4800:
'osg::Texture::TextureObject *' : forcing value to bool 'true' or 'false'
(performance warning)
1ReadFile.cpp
1E:\OpenSceneGraph\include\osgDB/DatabasePager(337) : warning C4800:
'osg::Texture::TextureObject *' : forcing value to bool 'true' or 'false'
(performance warning)
1Output.cpp
1E:\OpenSceneGraph\include\osgDB/DatabasePager(337) : warning C4800:
'osg::Texture::TextureObject *' : forcing value to bool 'true' or 'false'
(performance warning)
1Input.cpp
1E:\OpenSceneGraph\include\osgDB/DatabasePager(337) : warning C4800:
'osg::Texture::TextureObject *' : forcing value to bool 'true' or 'false'
(performance warning)
1ImageOptions.cpp
1FileUtils.cpp
1E:\OpenSceneGraph\include\osgDB/DatabasePager(337) : warning C4800:
'osg::Texture::TextureObject *' : forcing value to bool 'true' or 'false'
(performance warning)
1FileNameUtils.cpp
1E:\OpenSceneGraph\include\osgDB/DatabasePager(337) : warning C4800:
'osg::Texture::TextureObject *' : forcing value to bool 'true' or 'false'
(performance warning)
1FieldReaderIterator.cpp
1FieldReader.cpp
1Field.cpp
1DynamicLibrary.cpp
1E:\OpenSceneGraph\include\osgDB/DatabasePager(337) : warning C4800:
'osg::Texture::TextureObject *' : forcing value to bool 'true' or 'false'