|
Got a nice use case for you:
Get rid of the "~".Code:public void method13177(int i) { if ((i & ~0x7f) != 0) { if ((i & ~0x3fff) != 0) { if ((i & ~0x1fffff) != 0) { if ((i & ~0xfffffff) != 0) { writeByte(i >>> 28 | 0x80); } writeByte(i >>> 21 | 0x80); } writeByte(i >>> 14 | 0x80); } writeByte(i >>> 7 | 0x80); } writeByte(i & 0x7f); }
I am not familiar with how IntelliJ does it's inspections well enough to know if this is possible or not but is there a way to check function calls and if their arguments always equal something that is never true in order to combat most of the dummies in the client (and add this feature as an inspection)? A good example would be:
As you can see, the arg1 is always false but is being compared with true.
Will come in handy, nice work. Any chance you could make it remove multipliers?
Revisited this and added experiemental do-while inlining support;
It's not feature complete or very flexible and has no tests because I only needed it for one scenario, maybe one day I'll get around to finishing it off.
Enough people asked so I added this to the jetbrains plugin repository to easily install updates. Also 2020.1 support. Thanks to all those contributing!
Would be nice to have a version that works with the latest intellij versions. If anything I'll download an older version to run these on a client. Thanks, this should help a lot.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |
Tags for this Thread |