Remove useless string conversion.

Update gradle
This commit is contained in:
Oupson 2020-12-06 19:22:05 +01:00
parent 218afe26d7
commit f80c395174
4 changed files with 5 additions and 6 deletions

View File

@ -54,8 +54,8 @@ class fcTL : Chunk {
xOffset = Utils.uIntFromBytesBigEndian(byteArray.copyOfRange(i + 16, i + 20).map(Byte::toInt))
yOffset = Utils.uIntFromBytesBigEndian(byteArray.copyOfRange(i + 20, i + 24).map(Byte::toInt))
body = byteArray.copyOfRange(i + 4, i + bodySize + 4)
blendOp = getBlendOp(String.format("%02x", byteArray[33]).toLong(16).toInt())
disposeOp = getDisposeOp(String.format("%02x", byteArray[32]).toLong(16).toInt())
blendOp = getBlendOp(byteArray[33].toInt())
disposeOp = getDisposeOp(byteArray[32].toInt())
}
}
}

View File

@ -181,7 +181,6 @@ class Utils {
* [bytes] The bytes, in big endian order
* [Int] The parsed int
*/
// TODO CHECK IF THERE IS NO SHITTY STRING CONVERSION INSTEAD OF USING THIS FUNCTION
fun uIntFromBytesBigEndian(bytes: List<Int>): Int =
((bytes[0] and 0xFF) shl 24) or
((bytes[1] and 0xFF) shl 16) or

View File

@ -9,7 +9,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@ -1,6 +1,6 @@
#Tue Jun 16 22:41:01 CEST 2020
#Sun Dec 06 19:15:59 CET 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip