Gems/EMotionFX/Code/MCore/Source/MemoryTracker.cpp
void MemoryTracker::RegisterCategory(uint32 categoryID, const char* name)
    {
        LockGuard lock(m_mutex);

        // try to see if the category exists already
        auto item = m_categories.find(categoryID);
        if (item == m_categories.end())
        {
            // register the new category
            CategoryStats catStats;
            catStats.m_name = name;
            m_categories.insert(std::make_pair(categoryID, catStats));
        }
        else
        {
            item->second.m_name = name;
        }
    }
// register the name to a given category
register the name to a given category
register the name to a given category
void MemoryTracker::RegisterCategory(uint32 categoryID, const char* name)
    {
        LockGuard lock(m_mutex);
        auto item = m_categories.find(categoryID);
        if (item == m_categories.end())
        {
            CategoryStats catStats;
            catStats.m_name = name;
            m_categories.insert(std::make_pair(categoryID, catStats));
        }
        else
        {
            item->second.m_name = name;
        }
    }
void MemoryTracker :: RegisterCategory ( uint32 categoryID , const char * name ) { LockGuard lock ( m_mutex ) ; auto item = m_categories . find ( categoryID ) ; if ( item == m_categories . end ( ) ) { CategoryStats catStats ; catStats . m_name = name ; m_categories . insert ( std :: make_pair ( categoryID , catStats ) ) ; } else { item -> second . m_name = name ; } }
register the name to a given category
register the name to a given category
// try to see if the category exists already // register the new category