summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.h
diff options
context:
space:
mode:
author Stefano Cianciulli <scianciulli@google.com> 2022-07-08 12:24:51 +0000
committer Stefano Cianciulli <scianciulli@google.com> 2022-09-01 14:36:23 +0000
commit4000302c30501649e58f46d19692bfba541bd90c (patch)
tree019c37c3bb9934cc4c4fc7d0a3077412211fe8fe /compiler/optimizing/graph_visualizer.h
parentbbd1e630dc0be3303a07d2fdc131ef7cd7662050 (diff)
Refactor CollectionVector::SortByMapOrder
The current implementation of the SortByMapOrder method is making use of std::unique_ptr::release to clear the pointer maintained in the vector during the sorting phase in order to avoid potential double-free errors, but this is triggering the bugprone-unused-return-value check in clang-tidy. This refactor gets rid of the need to call release, making it programmatically safe to move pointers while sorting, while maintaining the same O(n) time complexity. Bug: 213953102 Test: m tidy-art Test: atest art_dexlayout_tests (especially DexLayoutTest.DexFileOutput) Change-Id: I525299c347d89171f91e10323d5aa8702e22b8d5
Diffstat (limited to 'compiler/optimizing/graph_visualizer.h')
0 files changed, 0 insertions, 0 deletions