forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media: Use
base::flat_map<>::contains()
Use `base::flat_map<>::contains()` instead of `find()` and `count()` for the better code readability: * It is less readable and could easily lead another bugs if we mix up using `find()`, `count()` and `end()` methods of STL map or chromium flat_map. * Replaced with `contains()` method for `base::flat_map<>` (chromium/src/base/containers/flat_map.h) only since C++20 is not supported yet for Chromium (go/cpp-chrome). * Target path: /src/media * Exception: Did not replace them if the iterator returned by `find ()` method is used in the code. ``` autoninja -C out/Default media_unittests out/Default/media_unittests ``` Bug: 1332591 Change-Id: Idf5374daf26c777672a6c4a672e5b51e5155ed79 Test: All tests passed on an instance of Linux cloudtop Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3696614 Reviewed-by: Xiaohan Wang <xhwang@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Sangbaek Park <sangbaekpark@chromium.org> Cr-Commit-Position: refs/heads/main@{#1014130}
- Loading branch information
Showing
8 changed files
with
17 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters