Bug 72728

Summary: Small fix in CProject
Product: [Tools] CDT Reporter: Alain Magloire <alain>
Component: cdt-coreAssignee: Alain Magloire <alain>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dave.daoust
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Alain Magloire CLA 2004-08-26 15:38:01 EDT
In CProject.getAllSourceRoots(), probably because of using
the JDT code template, calls to computeSourceRoots() were made twice,
like this:

roots = pinfo.sourceRoots = (ISourceRoot[])computeSourceRoots.toArray(
     new ISourceRoot[computeSourceRoots.size()]);

Notice the second call, this was a waste of time and memory, fix to do:

List list = computeSourceRoots();
roots = pinfo.sourceRoots = (ISourceRoot[])list.toArray(new ISourceRoot
[list.size()]);
Comment 1 Alain Magloire CLA 2004-08-26 15:38:37 EDT
Fixed in the branch (2.0.1) and the head.