Bug 72728 - Small fix in CProject
Summary: Small fix in CProject
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Alain Magloire CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-26 15:38 EDT by Alain Magloire CLA
Modified: 2004-08-26 15:38 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.