Skip to content

Commit

Permalink
Only check data views with the same top-level variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
mikke89 committed Aug 17, 2024
1 parent 0b7e006 commit 6144d10
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Source/Core/DataView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,12 @@ bool DataViews::Update(DataModel& model, const DirtyVariables& dirty_variables)
for (const String& variable_name : dirty_variables)
{
DataAddress address = model.ResolveAddress(variable_name, nullptr);
if (address.size() > 1)
{
for (const DataViewPtr& view : views)
{
if (view->HasAddressDependency(address))
dirty_views.push_back(view.get());
}
}
else
if (address.empty())
continue;
auto pair = name_view_map.equal_range(address.front().name);
for (auto it = pair.first; it != pair.second; ++it)
{
auto pair = name_view_map.equal_range(variable_name);
for (auto it = pair.first; it != pair.second; ++it)
if (address.size() <= 1 || it->second->HasAddressDependency(address))
dirty_views.push_back(it->second);
}
}
Expand Down

0 comments on commit 6144d10

Please sign in to comment.