Just a quickie I'm not sure about.
If I did a linear search (t'is linear, right?) like this:
How does that compare to the std::find() function? Or is it (std::find()) implementation specific?Code:/* GetItemByName */ Item* ItemManager::GetItemByName( const std::string& name ) const { std::list<Item*>::const_iterator it = items.begin(); for ( ; it != items.end(); it++ ) { Item* i = (*it); if ( i->name == name ) return i; } return 0; // Doesn't exist }