From 83a142b944e52319cbb852a7fb6d976837e4f16e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 15 Apr 2002 08:51:11 +0000 Subject: [PATCH] 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. --- src/osgPlugins/flt/LongIDRecord.cpp | 6 ------ src/osgPlugins/flt/flt2osg.cpp | 7 ++++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/osgPlugins/flt/LongIDRecord.cpp b/src/osgPlugins/flt/LongIDRecord.cpp index 2ae8ec4b3..5f4ba1ca1 100644 --- a/src/osgPlugins/flt/LongIDRecord.cpp +++ b/src/osgPlugins/flt/LongIDRecord.cpp @@ -6,12 +6,6 @@ using namespace flt; -//////////////////////////////////////////////////////////////////// -// -// MaterialPaletteRecord -// -//////////////////////////////////////////////////////////////////// - RegisterRecordProxy g_LongIDProxy; LongIDRecord::LongIDRecord() diff --git a/src/osgPlugins/flt/flt2osg.cpp b/src/osgPlugins/flt/flt2osg.cpp index 9437deebe..127751a93 100644 --- a/src/osgPlugins/flt/flt2osg.cpp +++ b/src/osgPlugins/flt/flt2osg.cpp @@ -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 '"<szIdent,pSLongID->RecHeader.length()-4)<<"'"<szIdent<<"'"<setName(std::string(pSLongID->szIdent,pSLongID->RecHeader.length()-4)); return NULL; }