Round one of fixes to avoid ridiculous numbers of spurious copy constructor and destructor calls.

Most of these fixes involve calls to BOOST_FOREACH to iterate over a map or unordered_map where the
iterator type didn't perfectly match the internal type, so a reference into the map couldn't be created
and a new value/content pair had to be created for each iteration.
This commit is contained in:
JoelKatz
2012-12-17 20:20:24 -08:00
parent 961ac4690e
commit 2a06686b7c
14 changed files with 29 additions and 27 deletions

View File

@@ -111,7 +111,7 @@ std::string SField::getName() const
SField::ref SField::getField(const std::string& fieldName)
{ // OPTIMIZEME me with a map. CHECKME this is case sensitive
boost::mutex::scoped_lock sl(mapMutex);
typedef std::pair<const int, SField::ptr> int_sfref_pair;
typedef std::map<int, SField::ptr>::value_type int_sfref_pair;
BOOST_FOREACH(const int_sfref_pair& fieldPair, codeToField)
{
if (fieldPair.second->fieldName == fieldName)