diff options
author | Anton Bikineev <bikineev@chromium.org> | 2021-05-15 22:35:36 +0000 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2021-07-25 21:14:18 -0700 |
commit | 1a96551a279242efef41468357e38d3091e884bc (patch) | |
tree | 04fb6730d8927a839d99d24492555b877077317d /rel32_utils.h | |
parent | 147f86be24a5ceb5447a9376fdc8c65044bb2977 (diff) | |
download | zucchini-1a96551a279242efef41468357e38d3091e884bc.tar.gz |
components: Replace base::Optional and friends with absl counterparts
This replaces:
- base::Optional -> absl::optional
- include "base/optional.h"
->
include "third_party/abseil-cpp/absl/types/optional.h"
- base::nullopt -> absl::nullopt
- base::make_optional -> absl::make_optional
Bug: 1202909
Change-Id: If697b7bf69b199c1796f873eedca3359cdb48c64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2897151
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Owners-Override: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#883296}
NOKEYCHECK=True
GitOrigin-RevId: 1156b5f891de178171e71b9221a96bef1ced3d3b
Diffstat (limited to 'rel32_utils.h')
-rw-r--r-- | rel32_utils.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rel32_utils.h b/rel32_utils.h index 946fcc6..4f7e0f3 100644 --- a/rel32_utils.h +++ b/rel32_utils.h @@ -11,12 +11,12 @@ #include "base/logging.h" #include "base/macros.h" -#include "base/optional.h" #include "components/zucchini/address_translator.h" #include "components/zucchini/arm_utils.h" #include "components/zucchini/buffer_view.h" #include "components/zucchini/image_utils.h" #include "components/zucchini/io_utils.h" +#include "third_party/abseil-cpp/absl/types/optional.h" namespace zucchini { @@ -36,8 +36,8 @@ class Rel32ReaderX86 : public ReferenceReader { const AddressTranslator& translator); ~Rel32ReaderX86() override; - // Returns the next reference, or base::nullopt if exhausted. - base::Optional<Reference> GetNext() override; + // Returns the next reference, or absl::nullopt if exhausted. + absl::optional<Reference> GetNext() override; private: ConstBufferView image_; @@ -91,7 +91,7 @@ class Rel32ReaderArm : public ReferenceReader { rel32_end_ = rel32_locations.end(); } - base::Optional<Reference> GetNext() override { + absl::optional<Reference> GetNext() override { while (cur_it_ < rel32_end_ && *cur_it_ < hi_) { offset_t location = *(cur_it_++); CODE_T code = ADDR_TRAITS::Fetch(view_, location); @@ -103,7 +103,7 @@ class Rel32ReaderArm : public ReferenceReader { return Reference{location, target}; } } - return base::nullopt; + return absl::nullopt; } private: |