File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
GeneralsMD/Code/GameEngine Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ friend class ImageCollection;
116116// -------------------------------------------------------------------------------------------------
117117class ImageCollection : public SubsystemInterface
118118{
119+ typedef std::map<NameKeyType, Image *> ImageMap;
119120
120121public:
121122
@@ -136,14 +137,14 @@ class ImageCollection : public SubsystemInterface
136137 // / enumerates the list of existing images
137138 Image *Enum (unsigned index)
138139 {
139- for (std::map< unsigned ,Image *> ::iterator i=m_imageMap.begin ();i!=m_imageMap.end ();++i)
140+ for (ImageMap ::iterator i=m_imageMap.begin ();i!=m_imageMap.end ();++i)
140141 if (!index--)
141142 return i->second ;
142143 return NULL ;
143144 }
144145
145146protected:
146- std::map< unsigned ,Image *> m_imageMap; // /< maps named keys to images
147+ ImageMap m_imageMap; // /< maps named keys to images
147148};
148149
149150// INLINING ///////////////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ ImageCollection::ImageCollection( void )
204204// -------------------------------------------------------------------------------------------------
205205ImageCollection::~ImageCollection ( void )
206206{
207- for (std::map< unsigned ,Image *> ::iterator i=m_imageMap.begin ();i!=m_imageMap.end ();++i)
207+ for (ImageMap ::iterator i=m_imageMap.begin ();i!=m_imageMap.end ();++i)
208208 deleteInstance (i->second );
209209}
210210
@@ -221,7 +221,7 @@ void ImageCollection::addImage( Image *image )
221221// -------------------------------------------------------------------------------------------------
222222const Image *ImageCollection::findImageByName ( const char * name ) const
223223{
224- std::map< unsigned ,Image *> ::const_iterator i=m_imageMap.find (TheNameKeyGenerator->nameToLowercaseKey (name));
224+ ImageMap ::const_iterator i=m_imageMap.find (TheNameKeyGenerator->nameToLowercaseKey (name));
225225 return i==m_imageMap.end ()?NULL :i->second ;
226226}
227227
You can’t perform that action at this time.
0 commit comments