mirror of
https://github.com/open-goal/jak-project
synced 2026-06-24 17:53:18 -04:00
Fix a small regression impacting MSVC debug builds (#285)
* decomp: Fix nonempty_intersection impl for MSVC Debugging use-case * docs: Add info on getting ASan builds running on Visual Studio w/o exceptions
This commit is contained in:
@@ -110,10 +110,12 @@ Form* FormStack::pop_reg(const Variable& var,
|
||||
|
||||
namespace {
|
||||
bool nonempty_intersection(const RegSet& a, const RegSet& b) {
|
||||
// todo - if we ever switch to bit reg sets, this could be a lot faster.
|
||||
std::vector<Register> isect;
|
||||
std::set_intersection(a.begin(), a.end(), b.begin(), b.end(), std::back_inserter(isect));
|
||||
return !isect.empty();
|
||||
for (auto x : a) {
|
||||
if (b.find(x) != b.end()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -378,4 +380,4 @@ std::vector<FormElement*> rewrite_to_get_var(FormStack& stack,
|
||||
return default_result;
|
||||
}
|
||||
|
||||
} // namespace decompiler
|
||||
} // namespace decompiler
|
||||
|
||||
Reference in New Issue
Block a user