hi everybody,
in svn 12073 file projectloader.cpp I found a unused
std::vector<wxString> files;
on line 995. It is not used by anything nor assigned anything to it. Was it forgotten there?
Then, in the same file starting from line 1553 I found this code:
std::vector<wxString> filesThrougGlobs;
const std::vector<cbProject::Glob>& unitGlobs = m_pProject->GetGlobs();
for (std::size_t index = 0; index < unitGlobs.size(); ++index)
{
const cbProject::Glob& glob = unitGlobs[index];
if (TiXmlElement* unitsGlobNode = AddElement(prjnode, "UnitsGlob", "directory", glob.m_Path))
{
unitsGlobNode->SetAttribute("recursive", glob.m_Recursive ? "1" : "0");
unitsGlobNode->SetAttribute("wildcard", cbU2C(glob.m_WildCard));
}
std::vector<wxString> files = filesInDir(glob.m_Path, glob.m_WildCard, glob.m_Recursive, m_pProject->GetBasePath());
std::copy(files.begin(), files.end(), std::back_inserter(filesThrougGlobs));
In the second line counting from the end a vector gets declared and initialized. In the direct following last line, this same vector is copied to a up to this moment empty vector which was declared on the first line of the snippet. Is this the remains of something not properly edited out?
Regards
frithjofh