Change rasterizer raw injector from depending on hardcoded values

This commit is contained in:
Lucwousin
2019-11-01 07:43:48 +01:00
parent 163193a026
commit a980aa660c
6 changed files with 274 additions and 381 deletions

View File

@@ -52,8 +52,7 @@ public abstract class ArrayStore extends Instruction implements ArrayStoreInstru
if (r.getInstruction() instanceof GetFieldInstruction)
{
GetFieldInstruction gf = (GetFieldInstruction) r.getInstruction();
Field f = gf.getMyField();
return f;
return gf.getMyField();
}
return null;
@@ -89,7 +88,7 @@ public abstract class ArrayStore extends Instruction implements ArrayStoreInstru
Field f1 = gf1.getMyField(),
f2 = gf2.getMyField();
assert MappingExecutorUtil.isMaybeEqual(f1, f2);
if (f1 != null && f2 != null)

View File

@@ -86,7 +86,7 @@ public class InvokeStatic extends Instruction implements InvokeInstruction
@SuppressWarnings("unchecked")
public List<net.runelite.asm.Method> getMethods()
{
return myMethod != null ? Arrays.asList(myMethod) : Collections.EMPTY_LIST;
return myMethod != null ? Collections.singletonList(myMethod) : Collections.EMPTY_LIST;
}
@Override

View File

@@ -70,10 +70,9 @@ public class MethodContext
return contexts.get(i);
}
@SuppressWarnings("unchecked")
public Collection<InstructionContext> getInstructionContexts()
{
return (Collection) contexts.values();
return contexts.values();
}
public void reset()