diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2021-11-02 21:56:43 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-11-02 21:56:43 +0000 |
commit | 8be98142ecdba40b2ea9be10b11a23f4e6b67b05 (patch) | |
tree | 0a310ca653ef73c547d80da63c87fcb2c0636bcb /target_pool.h | |
parent | b77318bc7ecfba25e4966b56b9e9ab593925ad9d (diff) | |
parent | 7be427590935bc88198d32004449ccfcf60b60d4 (diff) | |
download | zucchini-8be98142ecdba40b2ea9be10b11a23f4e6b67b05.tar.gz |
Merge remote-tracking branch 'aosp/upstream-main' into dev am: a90c04389f am: ddc43dc959 am: d9eed84a58 am: 58b4d19a6b am: 7be4275909
Original change: https://android-review.googlesource.com/c/platform/external/zucchini/+/1877854
Change-Id: Ifdb1f7882cc237258a3395d28158d50bb4b43136
Diffstat (limited to 'target_pool.h')
-rw-r--r-- | target_pool.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/target_pool.h b/target_pool.h index 27884d6..fb462b2 100644 --- a/target_pool.h +++ b/target_pool.h @@ -7,6 +7,7 @@ #include <stddef.h> +#include <deque> #include <vector> #include "components/zucchini/image_utils.h" @@ -21,11 +22,11 @@ class TargetSource; // with a list of associated reference types, only used during patch generation. class TargetPool { public: - using const_iterator = std::vector<offset_t>::const_iterator; + using const_iterator = std::deque<offset_t>::const_iterator; TargetPool(); // Initializes the object with given sorted and unique |targets|. - explicit TargetPool(std::vector<offset_t>&& targets); + explicit TargetPool(std::deque<offset_t>&& targets); TargetPool(TargetPool&&); TargetPool(const TargetPool&); ~TargetPool(); @@ -62,7 +63,7 @@ class TargetPool { void FilterAndProject(const OffsetMapper& offset_mapper); // Accessors for testing. - const std::vector<offset_t>& targets() const { return targets_; } + const std::deque<offset_t>& targets() const { return targets_; } const std::vector<TypeTag>& types() const { return types_; } // Returns the number of targets. @@ -72,7 +73,7 @@ class TargetPool { private: std::vector<TypeTag> types_; // Enumerates type_tag for this pool. - std::vector<offset_t> targets_; // Targets for pool in ascending order. + std::deque<offset_t> targets_; // Targets for pool in ascending order. }; } // namespace zucchini |