Skip to content

Commit

Permalink
making linter happy
Browse files Browse the repository at this point in the history
Summary:
This is a behavior preserving change.

{F1068254192: lint removal}

Reviewed By: thezhangwei

Differential Revision: D48275042

fbshipit-source-id: 1626b9b2efc58f95e57de73d3767e4ebacec3243
  • Loading branch information
Nikolai Tillmann authored and facebook-github-bot committed Aug 11, 2023
1 parent f222600 commit 50fd3f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
20 changes: 10 additions & 10 deletions opt/interdex/InterDex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,20 +798,20 @@ void InterDex::emit_remaining_classes_legacy(DexInfo& dex_info,
}

std::optional<FlushOutDexResult> opt_fodr;
bool emitted =
auto res =
emit_class(m_emitting_state, dex_info, cls, /* check_if_skip */ false,
/* perf_sensitive */ false, canary_cls, &opt_fodr);
if (opt_fodr) {
always_assert(!emitted);
always_assert(!res.emitted);
post_process_dex(m_emitting_state, *opt_fodr);
m_cross_dex_ref_minimizer.reset();
pick_worst = true;
continue;
}

m_cross_dex_ref_minimizer.erase(cls, emitted);
m_cross_dex_ref_minimizer.erase(cls, res.emitted);

pick_worst = pick_worst && !emitted;
pick_worst = pick_worst && !res.emitted;
}
}

Expand Down Expand Up @@ -846,18 +846,18 @@ void InterDex::emit_remaining_classes_exploring_alternatives(
}

std::optional<FlushOutDexResult> opt_fodr;
bool emitted = inter_dex->emit_class(emitting_state, dex_info, cls,
/* check_if_skip */ false,
/* perf_sensitive */ false,
&canary_cls, &opt_fodr);
auto res = inter_dex->emit_class(emitting_state, dex_info, cls,
/* check_if_skip */ false,
/* perf_sensitive */ false,
&canary_cls, &opt_fodr);
if (opt_fodr) {
always_assert(!emitted);
always_assert(!res.emitted);
cross_dex_ref_minimizer.reset();
fodrs.push_back(*opt_fodr);
break;
}

cross_dex_ref_minimizer.erase(cls, emitted);
cross_dex_ref_minimizer.erase(cls, res.emitted);
}
return cross_dex_ref_minimizer.get_remaining_difficulty();
}
Expand Down
2 changes: 0 additions & 2 deletions opt/interdex/InterDex.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ class InterDex {
struct EmitResult {
bool emitted{false};
bool overflowed{false};

operator bool() const { return emitted; }
};

struct FlushOutDexResult {
Expand Down

0 comments on commit 50fd3f6

Please sign in to comment.