GT-3382: Formatting fixes.

This commit is contained in:
ghidorahrex 2019-12-10 13:53:24 -05:00
parent b6e3d784b1
commit 600cf4d8a2
2 changed files with 11 additions and 8 deletions

View file

@ -15,6 +15,10 @@
*/
package ghidra.pcodeCPort.slghpatexpress;
import java.io.PrintStream;
import org.jdom.Element;
import generic.stl.VectorSTL;
import ghidra.pcodeCPort.context.*;
import ghidra.pcodeCPort.sleighbase.SleighBase;
@ -24,10 +28,6 @@ import ghidra.pcodeCPort.utils.MutableInt;
import ghidra.pcodeCPort.utils.XmlUtils;
import ghidra.sleigh.grammar.Location;
import java.io.PrintStream;
import org.jdom.Element;
public class OperandValue extends PatternValue {
private int index; // This is the defining field of expression
@ -49,8 +49,9 @@ public class OperandValue extends PatternValue {
@Override
public TokenPattern genMinPattern(VectorSTL<TokenPattern> ops) {
if (index >= ops.size())
if (index >= ops.size()) {
return null;
}
return ops.get(index);
}

View file

@ -543,8 +543,9 @@ public class Constructor {
}
else if (defexp != null) {
TokenPattern tmppat = defexp.genMinPattern(oppattern);
if (null == tmppat)
if (null == tmppat) {
throw new SleighError("operand " + sym.getName() + " has an issue", location);
}
oppattern.push_back(tmppat);
}
else {
@ -573,8 +574,9 @@ public class Constructor {
// in bytes
OperandResolve resolve = new OperandResolve(operands);
if (!pateq.resolveOperandLeft(resolve))
if (!pateq.resolveOperandLeft(resolve)) {
throw new SleighError("Unable to resolve operand offsets", location);
}
// Unravel relative offsets to absolute (if possible)
for (int i = 0; i < operands.size(); ++i) {