diff --git a/src/osgPlugins/dxf/dxfBlock.h b/src/osgPlugins/dxf/dxfBlock.h index 8d568f8db..3be191a08 100644 --- a/src/osgPlugins/dxf/dxfBlock.h +++ b/src/osgPlugins/dxf/dxfBlock.h @@ -25,6 +25,8 @@ class dxfFile; class codeValue; class dxfEntity; +typedef std::vector > EntityList; + class dxfBlock : public osg::Referenced { public: @@ -32,10 +34,11 @@ public: virtual ~dxfBlock() {} inline const std::string& getName() const { return _name; } virtual void assign(dxfFile* dxf, codeValue& cv); - std::vector > & getEntityList() { return _entityList; } + EntityList& getEntityList() { return _entityList; } const osg::Vec3d& getPosition() const; + protected: - std::vector > _entityList; + EntityList _entityList; dxfEntity* _currentEntity; std::string _name; osg::Vec3d _position; diff --git a/src/osgPlugins/dxf/dxfEntity.cpp b/src/osgPlugins/dxf/dxfEntity.cpp index 7881cf570..f27df73d5 100644 --- a/src/osgPlugins/dxf/dxfEntity.cpp +++ b/src/osgPlugins/dxf/dxfEntity.cpp @@ -751,8 +751,8 @@ dxfInsert::drawScene(scene* sc) sc->pushMatrix(m); sc->pushMatrix(back); - std::vector > l = _block->getEntityList(); - for (std::vector >::iterator itr = l.begin(); itr != l.end(); ++itr) { + EntityList& l = _block->getEntityList(); + for (EntityList::iterator itr = l.begin(); itr != l.end(); ++itr) { dxfBasicEntity* e = (*itr)->getEntity(); if (e) { e->drawScene(sc); diff --git a/src/osgPlugins/dxf/dxfSection.cpp b/src/osgPlugins/dxf/dxfSection.cpp index 92bd682b9..15dee2628 100644 --- a/src/osgPlugins/dxf/dxfSection.cpp +++ b/src/osgPlugins/dxf/dxfSection.cpp @@ -78,7 +78,7 @@ void dxfEntities::assign(dxfFile* dxf, codeValue& cv) void dxfEntities::drawScene(scene* sc) { - for (std::vector >::iterator itr = _entityList.begin(); + for (EntityList::iterator itr = _entityList.begin(); itr != _entityList.end(); ++itr) (*itr)->drawScene(sc); } diff --git a/src/osgPlugins/dxf/dxfSection.h b/src/osgPlugins/dxf/dxfSection.h index 15a52dfcb..155659a7f 100644 --- a/src/osgPlugins/dxf/dxfSection.h +++ b/src/osgPlugins/dxf/dxfSection.h @@ -85,8 +85,8 @@ public: virtual void drawScene(scene* sc); protected: - dxfEntity* _currentEntity; - std::vector > _entityList; + dxfEntity* _currentEntity; + EntityList _entityList; };