From 8ba55e29229d71e0f5c95aac079b4ae24058530c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 10 Nov 2004 21:47:08 +0000 Subject: [PATCH] Added debugging info for swapped endian values --- src/osgDB/Archive.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/osgDB/Archive.cpp b/src/osgDB/Archive.cpp index 1de821144..c93980bd6 100644 --- a/src/osgDB/Archive.cpp +++ b/src/osgDB/Archive.cpp @@ -85,6 +85,10 @@ Archive::IndexBlock* Archive::IndexBlock::read(std::istream& in, bool doEndianSw osg::swapBytes(reinterpret_cast(&indexBlock->_offsetOfNextAvailableSpace), sizeof(indexBlock-> _offsetOfNextAvailableSpace)); } + osg::notify(osg::NOTICE)<<"indexBlock->_blockSize="<_blockSize<_filePositionNextIndexBlock="<_filePositionNextIndexBlock<_offsetOfNextAvailableSpace="<_offsetOfNextAvailableSpace<allocateData(indexBlock->_blockSize); if (indexBlock->_data) { @@ -100,13 +104,15 @@ Archive::IndexBlock* Archive::IndexBlock::read(std::istream& in, bool doEndianSw ptr += sizeof(pos_type); osg::swapBytes(ptr,sizeof(size_type)); - size_type size = *(reinterpret_cast(ptr)); ptr += sizeof(size_type); osg::swapBytes(ptr,sizeof(unsigned int)); unsigned int filename_size = *(reinterpret_cast(ptr)); ptr += sizeof(unsigned int); ptr += filename_size; + + osg::notify(osg::NOTICE)<<"filename size="<