wxString CodeParser::GetFunctionContents(wxString function) { wxString contents = wxT(""); Function *func; m_functionIter = m_functions.find(RemoveWhiteSpace(function)); if (m_functionIter != m_functions.end()) { func = m_functionIter->second; contents = func->GetContents(); m_functions.erase(m_functionIter); delete func; } return contents; }