mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
e2e8713bc8
commit
3e237ffb7d
@ -97,6 +97,9 @@ android {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
buildToolsVersion '30.0.3'
|
||||
tasks.withType(JavaCompile) {
|
||||
options.compilerArgs << "-Xlint:unchecked"
|
||||
}
|
||||
}
|
||||
|
||||
resourcePlaceholders {
|
||||
|
@ -11,7 +11,7 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings({"FieldCanBeLocal", "rawtypes", "StatementWithEmptyBody", "unused"})
|
||||
@SuppressWarnings({"FieldCanBeLocal", "StatementWithEmptyBody", "unused"})
|
||||
public class QueryTTF {
|
||||
private static class Header {
|
||||
public int majorVersion;
|
||||
@ -223,7 +223,8 @@ public class QueryTTF {
|
||||
private final List<Integer> loca = new LinkedList<>();
|
||||
private final CmapLayout Cmap = new CmapLayout();
|
||||
private final List<GlyfLayout> glyf = new LinkedList<>();
|
||||
private final Pair[] pps = new Pair[]{
|
||||
@SuppressWarnings("unchecked")
|
||||
private final Pair<Integer, Integer>[] pps = new Pair[]{
|
||||
Pair.of(3, 10),
|
||||
Pair.of(0, 4),
|
||||
Pair.of(3, 1),
|
||||
@ -515,7 +516,7 @@ public class QueryTTF {
|
||||
private int getGlyfIndex(int code) {
|
||||
if (code == 0) return 0;
|
||||
int fmtKey = 0;
|
||||
for (@SuppressWarnings("unchecked") Pair<Integer, Integer> item : pps) {
|
||||
for (Pair<Integer, Integer> item : pps) {
|
||||
for (CmapRecord record : Cmap.records) {
|
||||
if ((item.getLeft() == record.platformID) && (item.getRight() == record.encodingID)) {
|
||||
fmtKey = record.offset;
|
||||
|
@ -11,6 +11,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.2.0'
|
||||
//noinspection DifferentKotlinGradleVersion
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "de.timfreiheit.resourceplaceholders:placeholders:0.3"
|
||||
}
|
||||
@ -19,7 +20,7 @@ buildscript {
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
maven { url 'https://maven.aliyun.com/repository/public/'}
|
||||
maven { url 'https://maven.aliyun.com/repository/public/' }
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url "https://maven.google.com/" }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user