diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationMap.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationMap.java index 3c92cc5772f..948bdf5864d 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationMap.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationMap.java @@ -676,11 +676,7 @@ public class LocationMap implements ILocationResolver { } } contexts.addAll(ctx.getChildren()); - if (contexts.isEmpty()) { - ctx= null; - } else { - ctx= contexts.removeFirst(); - } + ctx= contexts.pollFirst(); } } if (ctx != null) {