mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 11:15:38 +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:
parent
f4a12cb474
commit
cf0b905a5a
1 changed files with 8 additions and 9 deletions
|
@ -93,17 +93,16 @@ public class MIThread {
|
||||||
String core = null;
|
String core = null;
|
||||||
String name = null;
|
String name = null;
|
||||||
|
|
||||||
for (int j = 0; j < results.length; j++) {
|
for (MIResult result : results) {
|
||||||
MIResult result = results[j];
|
|
||||||
String var = result.getVariable();
|
String var = result.getVariable();
|
||||||
if (var.equals("id")) { //$NON-NLS-1$
|
if (var.equals("id")) { //$NON-NLS-1$
|
||||||
MIValue val = results[j].getMIValue();
|
MIValue val = result.getMIValue();
|
||||||
if (val instanceof MIConst) {
|
if (val instanceof MIConst) {
|
||||||
threadId = ((MIConst) val).getCString().trim();
|
threadId = ((MIConst) val).getCString().trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (var.equals("target-id")) { //$NON-NLS-1$
|
else if (var.equals("target-id")) { //$NON-NLS-1$
|
||||||
MIValue val = results[j].getMIValue();
|
MIValue val = result.getMIValue();
|
||||||
if (val instanceof MIConst) {
|
if (val instanceof MIConst) {
|
||||||
targetId = ((MIConst) val).getCString().trim();
|
targetId = ((MIConst) val).getCString().trim();
|
||||||
osId = parseOsId(targetId);
|
osId = parseOsId(targetId);
|
||||||
|
@ -111,29 +110,29 @@ public class MIThread {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (var.equals("frame")) { //$NON-NLS-1$
|
else if (var.equals("frame")) { //$NON-NLS-1$
|
||||||
MITuple val = (MITuple)results[j].getMIValue();
|
MITuple val = (MITuple)result.getMIValue();
|
||||||
topFrame = new MIFrame(val);
|
topFrame = new MIFrame(val);
|
||||||
}
|
}
|
||||||
else if (var.equals("state")) { //$NON-NLS-1$
|
else if (var.equals("state")) { //$NON-NLS-1$
|
||||||
MIValue val = results[j].getMIValue();
|
MIValue val = result.getMIValue();
|
||||||
if (val instanceof MIConst) {
|
if (val instanceof MIConst) {
|
||||||
state = ((MIConst) val).getCString().trim();
|
state = ((MIConst) val).getCString().trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (var.equals("details")) { //$NON-NLS-1$
|
else if (var.equals("details")) { //$NON-NLS-1$
|
||||||
MIValue val = results[j].getMIValue();
|
MIValue val = result.getMIValue();
|
||||||
if (val instanceof MIConst) {
|
if (val instanceof MIConst) {
|
||||||
details = ((MIConst) val).getCString().trim();
|
details = ((MIConst) val).getCString().trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (var.equals("core")) { //$NON-NLS-1$
|
else if (var.equals("core")) { //$NON-NLS-1$
|
||||||
MIValue val = results[j].getMIValue();
|
MIValue val = result.getMIValue();
|
||||||
if (val instanceof MIConst) {
|
if (val instanceof MIConst) {
|
||||||
core = ((MIConst) val).getCString().trim();
|
core = ((MIConst) val).getCString().trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (var.equals("name")) { //$NON-NLS-1$
|
else if (var.equals("name")) { //$NON-NLS-1$
|
||||||
MIValue val = results[j].getMIValue();
|
MIValue val = result.getMIValue();
|
||||||
if (val instanceof MIConst) {
|
if (val instanceof MIConst) {
|
||||||
name = ((MIConst) val).getCString().trim();
|
name = ((MIConst) val).getCString().trim();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue