Skip to content

aco: Clean up some C++ usages

James Park requested to merge jpark37/mesa:aco-cpp-patterns into master

This review is mostly to show how to use C++ better within ACO. I'm not planning to go through all the files; I'm only touching some code near a change I was making anyway.

Iterate over maps by reference to avoid copies.

Replace find/insert with insert to avoid double search.

Use range-based for loop, avoiding copies by reference. Delete comment.

Erase by iterator instead of key to avoid repeat search.

Iterators unneeded to modify unwaited_instrs. Use range-based for loop.

Edited by James Park

Merge request reports