If I have a small inline function definition in my header, that I decide to move to my source, that starts like:
// check if there is an item for the alias
inline CDynamicMenuItem * CDynamicMenu::FindItem(const CString & name)
{
if (!this)
return nullptr;
// translates a given name to an nID, or returns false if not found
auto it = m_aliases.find(name);
if (it == m_aliases.end())
return nullptr;
return it->second;
}
Then after using refactor - move to source - I'll end up with:
DynamicMenu::CDynamicMenuItem * CDynamicMenu::FindItem(const CString & name)
{
if (!this)
return nullptr;
// translates a given name to an nID, or returns false if not found
auto it = m_aliases.find(name);
if (it == m_aliases.end())
return nullptr;
return it->second;
}
The title comment - describing what this function is for - is gone from the header, and did not make it to the .cpp file.