!3144 Modifying Code Alarms

Merge pull request !3144 from jing_han/master
This commit is contained in:
openharmony_ci 2022-12-02 12:29:25 +00:00 committed by Gitee
commit 7f56f31591
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 3 additions and 3 deletions

View File

@ -279,7 +279,7 @@ bool Scheduler::CalculateSchedulingUpperBound(const Circuit *circuit,
while (!dfsStack.empty()) {
auto &curState = dfsStack.top();
auto &curGate = curState.curGate;
auto &predGates = curState.predGates;
const auto &predGates = curState.predGates;
auto &idx = curState.idx;
auto &curUpperBound = curState.curUpperBound;
if (idx == predGates.size()) {

View File

@ -405,7 +405,7 @@ bool QuickFixLoader::UnloadPatch(JSThread *thread, const CString &patchFileName)
LOG_ECMA(INFO) << "Replace normal method: " << method->GetMethodName();
}
for (auto &item : reservedBaseClassMethodInfo_) {
for (const auto &item : reservedBaseClassMethodInfo_) {
ClassMethodIndex classMethodIndex = item.first;
ConstantPool *baseConstpool = ConstantPool::Cast(
(baseConstpoolValues.value().get()[classMethodIndex.constpoolNum]).GetTaggedObject());

View File

@ -272,7 +272,7 @@ void ArkStackMapBuilder::GenARKDeopt(const DeoptInfoType& deopt, std::pair<uint3
ARKDeopt v;
for (size_t i = 0; i < deopt.size(); i += 2) { // 2:<id, value>
ASSERT(std::holds_alternative<OffsetType>(deopt[i]));
auto &id = std::get<OffsetType>(deopt[i]);
const auto &id = std::get<OffsetType>(deopt[i]);
total += sizeof(OffsetType);
v.Id = id;
total += sizeof(LocationTy::Kind); // derive