mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 319512: Compilation warnings
This commit is contained in:
parent
4d22104036
commit
d64260e2ed
1 changed files with 11 additions and 13 deletions
|
@ -58,14 +58,14 @@ public class ParallelBuilder {
|
||||||
protected OutputStream err;
|
protected OutputStream err;
|
||||||
protected boolean resumeOnErrors;
|
protected boolean resumeOnErrors;
|
||||||
protected boolean buildIncrementally;
|
protected boolean buildIncrementally;
|
||||||
protected HashSet unsorted = new HashSet();
|
protected HashSet<BuildQueueElement> unsorted = new HashSet<BuildQueueElement>();
|
||||||
protected HashMap queueHash = new HashMap();
|
protected HashMap<IBuildStep, BuildQueueElement> queueHash = new HashMap<IBuildStep, BuildQueueElement>();
|
||||||
protected LinkedList queue = new LinkedList();
|
protected LinkedList<BuildQueueElement> queue = new LinkedList<BuildQueueElement>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class implements queue element
|
* This class implements queue element
|
||||||
*/
|
*/
|
||||||
protected class BuildQueueElement implements Comparable {
|
protected class BuildQueueElement implements Comparable<BuildQueueElement> {
|
||||||
protected IBuildStep step;
|
protected IBuildStep step;
|
||||||
protected int level;
|
protected int level;
|
||||||
|
|
||||||
|
@ -91,10 +91,9 @@ public class ParallelBuilder {
|
||||||
return step.hashCode();
|
return step.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int compareTo(Object obj) {
|
public int compareTo(BuildQueueElement elem) {
|
||||||
if (obj == null)
|
if (elem == null)
|
||||||
throw new NullPointerException();
|
throw new NullPointerException();
|
||||||
BuildQueueElement elem = (BuildQueueElement)obj;
|
|
||||||
|
|
||||||
if (elem.getLevel() > level)
|
if (elem.getLevel() > level)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -248,9 +247,8 @@ public class ParallelBuilder {
|
||||||
* Sorts the queue
|
* Sorts the queue
|
||||||
*/
|
*/
|
||||||
protected void sortQueue() {
|
protected void sortQueue() {
|
||||||
Iterator iter = unsorted.iterator();
|
for (BuildQueueElement elem : unsorted) {
|
||||||
while (iter.hasNext()) {
|
queue.add(elem);
|
||||||
queue.add(iter.next());
|
|
||||||
}
|
}
|
||||||
unsorted.clear();
|
unsorted.clear();
|
||||||
unsorted = null;
|
unsorted = null;
|
||||||
|
@ -272,7 +270,7 @@ public class ParallelBuilder {
|
||||||
for (int j = 0; j < steps.length; j++) {
|
for (int j = 0; j < steps.length; j++) {
|
||||||
IBuildStep st = steps[j];
|
IBuildStep st = steps[j];
|
||||||
if (st != null && st.getBuildDescription().getOutputStep() != st) {
|
if (st != null && st.getBuildDescription().getOutputStep() != st) {
|
||||||
BuildQueueElement b = (BuildQueueElement)queueHash.get(st);
|
BuildQueueElement b = queueHash.get(st);
|
||||||
if (b != null){
|
if (b != null){
|
||||||
if (b.level < level) b.setLevel(level);
|
if (b.level < level) b.setLevel(level);
|
||||||
} else {
|
} else {
|
||||||
|
@ -380,11 +378,11 @@ public class ParallelBuilder {
|
||||||
// Check if we need to schedule another process
|
// Check if we need to schedule another process
|
||||||
if (queue.size() != 0 && activeCount < active.length) {
|
if (queue.size() != 0 && activeCount < active.length) {
|
||||||
// Need to schedule another process
|
// Need to schedule another process
|
||||||
Iterator iter = queue.iterator();
|
Iterator<BuildQueueElement> iter = queue.iterator();
|
||||||
|
|
||||||
// Iterate over build queue
|
// Iterate over build queue
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
BuildQueueElement elem = (BuildQueueElement)iter.next();
|
BuildQueueElement elem = iter.next();
|
||||||
|
|
||||||
// If "active steps" list is full, then break loop
|
// If "active steps" list is full, then break loop
|
||||||
if (activeCount == active.length)
|
if (activeCount == active.length)
|
||||||
|
|
Loading…
Add table
Reference in a new issue