Fixed the copying of LongIDRecord's strings in flt plugin so it now uses the record length-4,

to create the string. Also Removed some in appropriate comments from LongIDRecord, since they
were obvious and hang over of a copy and paste job on the code.
This commit is contained in:
Robert Osfield 2002-04-15 08:51:11 +00:00
parent 1c4de0e1d2
commit 83a142b944
2 changed files with 6 additions and 7 deletions

View File

@ -6,12 +6,6 @@
using namespace flt;
////////////////////////////////////////////////////////////////////
//
// MaterialPaletteRecord
//
////////////////////////////////////////////////////////////////////
RegisterRecordProxy<LongIDRecord> g_LongIDProxy;
LongIDRecord::LongIDRecord()

View File

@ -245,7 +245,12 @@ osg::Node* ConvertFromFLT::visitLongID(osg::Group* osgParent, LongIDRecord* rec)
{
SLongID *pSLongID = (SLongID*)rec->getData();
osgParent->setName(pSLongID->szIdent);
// these cout's are here for double checking whether handlng of the longID
// string is being managed corectly.
// std::cout << "ConvertFromFLT::visitLongID '"<<std::string(pSLongID->szIdent,pSLongID->RecHeader.length()-4)<<"'"<<std::endl;
// std::cout << "ConvertFromFLT::visitLongID cstyle string '"<<pSLongID->szIdent<<"'"<<std::endl;
osgParent->setName(std::string(pSLongID->szIdent,pSLongID->RecHeader.length()-4));
return NULL;
}