diff options
| author | 2014-09-03 23:56:11 -0400 | |
|---|---|---|
| committer | 2014-09-03 23:56:11 -0400 | |
| commit | 1faf3bee250f75d8c13708ab875a881a5b9cb6ed (patch) | |
| tree | 97845c1b8a184a6082b1b7ae199c632ea6375f8c /src/cuchaz/enigma/mapping/ClassMapping.java | |
| parent | updated ignore list (diff) | |
| download | enigma-fork-1faf3bee250f75d8c13708ab875a881a5b9cb6ed.tar.gz enigma-fork-1faf3bee250f75d8c13708ab875a881a5b9cb6ed.tar.xz enigma-fork-1faf3bee250f75d8c13708ab875a881a5b9cb6ed.zip | |
removed deobfuscated method signatures from mappings
They're too much work to maintain, and they're totally unnecessary!
Diffstat (limited to '')
| -rw-r--r-- | src/cuchaz/enigma/mapping/ClassMapping.java | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/cuchaz/enigma/mapping/ClassMapping.java b/src/cuchaz/enigma/mapping/ClassMapping.java index 6a89df7..200d9ca 100644 --- a/src/cuchaz/enigma/mapping/ClassMapping.java +++ b/src/cuchaz/enigma/mapping/ClassMapping.java | |||
| @@ -214,7 +214,7 @@ public class ClassMapping implements Serializable, Comparable<ClassMapping> | |||
| 214 | assert( wasAdded ); | 214 | assert( wasAdded ); |
| 215 | if( methodMapping.getDeobfName() != null ) | 215 | if( methodMapping.getDeobfName() != null ) |
| 216 | { | 216 | { |
| 217 | String deobfKey = getMethodKey( methodMapping.getDeobfName(), methodMapping.getDeobfSignature() ); | 217 | String deobfKey = getMethodKey( methodMapping.getDeobfName(), methodMapping.getObfSignature() ); |
| 218 | if( m_methodsByDeobf.containsKey( deobfKey ) ) | 218 | if( m_methodsByDeobf.containsKey( deobfKey ) ) |
| 219 | { | 219 | { |
| 220 | throw new Error( "Already have mapping for " + m_deobfName + "." + deobfKey ); | 220 | throw new Error( "Already have mapping for " + m_deobfName + "." + deobfKey ); |
| @@ -248,7 +248,7 @@ public class ClassMapping implements Serializable, Comparable<ClassMapping> | |||
| 248 | return name + signature; | 248 | return name + signature; |
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | public void setMethodNameAndSignature( String obfName, String obfSignature, String deobfName, String deobfSignature ) | 251 | public void setMethodName( String obfName, String obfSignature, String deobfName ) |
| 252 | { | 252 | { |
| 253 | MethodMapping methodMapping = m_methodsByObf.get( getMethodKey( obfName, obfSignature ) ); | 253 | MethodMapping methodMapping = m_methodsByObf.get( getMethodKey( obfName, obfSignature ) ); |
| 254 | if( methodMapping == null ) | 254 | if( methodMapping == null ) |
| @@ -257,23 +257,14 @@ public class ClassMapping implements Serializable, Comparable<ClassMapping> | |||
| 257 | } | 257 | } |
| 258 | else if( methodMapping.getDeobfName() != null ) | 258 | else if( methodMapping.getDeobfName() != null ) |
| 259 | { | 259 | { |
| 260 | boolean wasRemoved = m_methodsByDeobf.remove( getMethodKey( methodMapping.getDeobfName(), methodMapping.getDeobfSignature() ) ) != null; | 260 | boolean wasRemoved = m_methodsByDeobf.remove( getMethodKey( methodMapping.getDeobfName(), methodMapping.getObfSignature() ) ) != null; |
| 261 | assert( wasRemoved ); | 261 | assert( wasRemoved ); |
| 262 | } | 262 | } |
| 263 | methodMapping.setDeobfName( deobfName ); | 263 | methodMapping.setDeobfName( deobfName ); |
| 264 | methodMapping.setDeobfSignature( deobfSignature ); | 264 | boolean wasAdded = m_methodsByDeobf.put( getMethodKey( deobfName, obfSignature ), methodMapping ) == null; |
| 265 | boolean wasAdded = m_methodsByDeobf.put( getMethodKey( deobfName, deobfSignature ), methodMapping ) == null; | ||
| 266 | assert( wasAdded ); | 265 | assert( wasAdded ); |
| 267 | } | 266 | } |
| 268 | 267 | ||
| 269 | public void updateDeobfMethodSignatures( Translator translator ) | ||
| 270 | { | ||
| 271 | for( MethodMapping methodIndex : m_methodsByObf.values() ) | ||
| 272 | { | ||
| 273 | methodIndex.setDeobfSignature( translator.translateSignature( methodIndex.getObfSignature() ) ); | ||
| 274 | } | ||
| 275 | } | ||
| 276 | |||
| 277 | //// ARGUMENTS //////// | 268 | //// ARGUMENTS //////// |
| 278 | 269 | ||
| 279 | public void setArgumentName( String obfMethodName, String obfMethodSignature, int argumentIndex, String argumentName ) | 270 | public void setArgumentName( String obfMethodName, String obfMethodSignature, int argumentIndex, String argumentName ) |