MyFilesArray DirectCommands::GetProjectFilesSortedByWeight(ProjectBuildTarget* target, bool compile, bool link) { MyFilesArray files; for (int i = 0; i < m_pProject->GetFilesCount(); ++i) { ProjectFile* pf = m_pProject->GetFile(i); if(m_pCompiler->GetParentID().Matches(_T("lcy"))) { if(pf->file.GetExt().Lower().IsSameAs(_T("ld"))) { files.Add(pf); continue; } } // require compile if (compile && !pf->compile) continue; // require link if (link && !pf->link) continue; // if the file does not belong in this target (if we have a target), skip it if (target && (pf->buildTargets.Index(target->GetTitle()) == wxNOT_FOUND)) continue; files.Add(pf); // Why was this here?!? // if(m_doYield) // Manager::Yield(); } files.Sort(MySortProjectFilesByWeight); return files; }
MyFilesArray DirectCommands::GetProjectFilesSortedByWeight(ProjectBuildTarget* target, bool compile, bool link) const { MyFilesArray files; for (FilesList::iterator it = m_pProject->GetFilesList().begin(); it != m_pProject->GetFilesList().end(); ++it) { ProjectFile* pf = *it; // require compile if (compile && !pf->compile) continue; // require link if (link && !pf->link) continue; // if the file does not belong in this target (if we have a target), skip it if (target && (pf->buildTargets.Index(target->GetTitle()) == wxNOT_FOUND)) continue; files.Add(pf); } files.Sort(MySortProjectFilesByWeight); return files; }