1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 09:45:39 +02:00

MIThread: Use "enhanced" for loop

Change-Id: Iba8397b94b25682e9ebe5afececdb7932355a692
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Reviewed-on: https://git.eclipse.org/r/36436
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
Simon Marchi 2014-11-13 14:33:06 -05:00 committed by Marc Khouzam
parent f4a12cb474
commit cf0b905a5a

View file

@ -93,17 +93,16 @@ public class MIThread {
String core = null;
String name = null;
for (int j = 0; j < results.length; j++) {
MIResult result = results[j];
for (MIResult result : results) {
String var = result.getVariable();
if (var.equals("id")) { //$NON-NLS-1$
MIValue val = results[j].getMIValue();
MIValue val = result.getMIValue();
if (val instanceof MIConst) {
threadId = ((MIConst) val).getCString().trim();
}
}
else if (var.equals("target-id")) { //$NON-NLS-1$
MIValue val = results[j].getMIValue();
MIValue val = result.getMIValue();
if (val instanceof MIConst) {
targetId = ((MIConst) val).getCString().trim();
osId = parseOsId(targetId);
@ -111,29 +110,29 @@ public class MIThread {
}
}
else if (var.equals("frame")) { //$NON-NLS-1$
MITuple val = (MITuple)results[j].getMIValue();
MITuple val = (MITuple)result.getMIValue();
topFrame = new MIFrame(val);
}
else if (var.equals("state")) { //$NON-NLS-1$
MIValue val = results[j].getMIValue();
MIValue val = result.getMIValue();
if (val instanceof MIConst) {
state = ((MIConst) val).getCString().trim();
}
}
else if (var.equals("details")) { //$NON-NLS-1$
MIValue val = results[j].getMIValue();
MIValue val = result.getMIValue();
if (val instanceof MIConst) {
details = ((MIConst) val).getCString().trim();
}
}
else if (var.equals("core")) { //$NON-NLS-1$
MIValue val = results[j].getMIValue();
MIValue val = result.getMIValue();
if (val instanceof MIConst) {
core = ((MIConst) val).getCString().trim();
}
}
else if (var.equals("name")) { //$NON-NLS-1$
MIValue val = results[j].getMIValue();
MIValue val = result.getMIValue();
if (val instanceof MIConst) {
name = ((MIConst) val).getCString().trim();
}