Commit 10b888bd authored by Pavel Vainerman's avatar Pavel Vainerman

Перенёс оптимизацию для ObjectIndex_idXML.h из 2.0, очень уж актуально.

parent a8acd5bf
...@@ -225,13 +225,10 @@ const ObjectInfo* ObjectIndex_idXML::getObjectInfo( const ObjectId id ) ...@@ -225,13 +225,10 @@ const ObjectInfo* ObjectIndex_idXML::getObjectInfo( const ObjectId id )
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
const ObjectInfo* ObjectIndex_idXML::getObjectInfo( const std::string& name ) const ObjectInfo* ObjectIndex_idXML::getObjectInfo( const std::string& name )
{ {
const char* n = name.c_str(); MapObjectKey::iterator it = mok.find(name);
for( MapObjects::iterator it=omap.begin(); it!=omap.end(); ++it ) if( it != mok.end() )
{ return getObjectInfo(it->second);
if( !strcmp(it->second.repName,n) )
return &(it->second);
}
return NULL; return NULL;
} }
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment