From ec51c4af15dfcd800a7a26acef4f4a3d16fd2553 Mon Sep 17 00:00:00 2001 From: bushixuanqi <57338301+bushixuanqi@users.noreply.github.com> Date: Fri, 9 Jul 2021 23:01:29 +0800 Subject: [PATCH] Update RuleAnalyzer.kt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化注释描述 --- .../main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt b/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt index 6e2da20aa..2b6462827 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt @@ -17,7 +17,7 @@ class RuleAnalyzer(data: String, code: Boolean = false) { val chompBalanced = if (code) ::chompCodeBalanced else ::chompRuleBalanced fun trim() { // 修剪当前规则之前的"@"或者空白符 - if(queue[pos] == '@' || queue[pos] < '!') { //为了减少不必要的去设置start或startX,先来个判断 + if(queue[pos] == '@' || queue[pos] < '!') { //在while里重复设置start和startX会拖慢执行速度,所以先来个判断是否存在需要修剪的字段,最后再一次性设置start和startX pos++ while (queue[pos] == '@' || queue[pos] < '!') pos++ start = pos //开始点推移