From Mourad Boufarguine, "This submissions fixes the problem of the difference of std::*::size_type between 32bit and 64 bit platforms. It wraps the reading and writing of std::*::size_type values using the osgDB::InputStream::readSize and osgDB::OutputStream::writeSize methods."

This commit is contained in:
Robert Osfield
2010-04-23 08:55:23 +00:00
parent 5d0b84edd0
commit 07328f3d17
6 changed files with 19 additions and 19 deletions

View File

@@ -13,7 +13,7 @@ static bool checkAnimations( const osgAnimation::AnimationManagerBase& manager )
static bool readAnimations( osgDB::InputStream& is, osgAnimation::AnimationManagerBase& manager )
{
unsigned int size = 0; is >> size >> osgDB::BEGIN_BRACKET;
unsigned int size = is.readSize(); is >> osgDB::BEGIN_BRACKET;
for ( unsigned int i=0; i<size; ++i )
{
osgAnimation::Animation* ani = dynamic_cast<osgAnimation::Animation*>( is.readObject() );
@@ -26,7 +26,7 @@ static bool readAnimations( osgDB::InputStream& is, osgAnimation::AnimationManag
static bool writeAnimations( osgDB::OutputStream& os, const osgAnimation::AnimationManagerBase& manager )
{
const osgAnimation::AnimationList& animations = manager.getAnimationList();
os << animations.size() << osgDB::BEGIN_BRACKET << std::endl;
os.writeSize(animations.size()); os << osgDB::BEGIN_BRACKET << std::endl;
for ( osgAnimation::AnimationList::const_iterator itr=animations.begin();
itr!=animations.end(); ++itr )
{