diff options
| author | 2022-07-08 12:24:51 +0000 | |
|---|---|---|
| committer | 2022-09-01 14:36:23 +0000 | |
| commit | 4000302c30501649e58f46d19692bfba541bd90c (patch) | |
| tree | 019c37c3bb9934cc4c4fc7d0a3077412211fe8fe /compiler/optimizing/graph_visualizer.h | |
| parent | bbd1e630dc0be3303a07d2fdc131ef7cd7662050 (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